10.3 Gradient Repeat

As we’ve seen, gradient handles don’t need to coincide with the edges of the object they apply to; they can be positioned absolutely anywhere on the canvas, and the object will just display whatever part of the gradient happens to fall within its limits. This, however, invites the question: What will be used to paint those parts of the object that are not covered by the gradient—those parts that are beyond the ends of a linear or outside the edge of an elliptic?

By default, these areas are painted by the flat color and transparency of the first or last gradient end stop. For example, if you have a small elliptic gradient with semitransparent white at the radii, the rest of the object outside the gradient will also be semitransparent white. However, this is not the only possibility.

Select an object with a gradient (but make sure that none of the handles are selected) and in the Repeat list of the Fill and Stroke dialog, select either reflected or direct instead of the default none. These options force the gradient to repeat itself indefinitely, either unchanged (direct), or with inversion of every second copy (reflected). This is an easy way to create various striped patterns on objects, as shown in Figure 10-6.

Using the gradient repeat option

Figure 10-6. Using the gradient repeat option