[cairo] Path Gradients
behdad at behdad.org
Fri Jan 4 10:55:45 PST 2008
On Fri, 2008-01-04 at 10:26 -0800, Bill Spitzak wrote:
> > Another interesting feature of the path gradients in the links is
> > one can also have color stop along the path (that is, along the
> > not only from the center to the path.
> You are right, some of the examples show that. The center point was a
> fixed color, but gradiated in straight lines to a different color at
> each control point, with that end color interpolated between them.
> It was unclear what happens with multiple-step gradients, which some
> the examples show. Does it only change the last step, or is there an
> to change all the steps?
The actual radial stops where done in the code using a Blend object,
that's like just having stops for alpha value. That is, instead of the
linear interpolation between the two ends, user can provide a detailed
blend function. No separate color stops.
> I found it interesting that all the "real" examples did not use this
> feature and kept a constant color. It may indicate that emulation of
> this is not necessary.
> I am still very interested in any explanation why the path needs to
> specified twice and what happens if the two paths are different.
What do you mean by twice? Where?
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo