[cairo] Path Gradients
Bill Spitzak
spitzak at thefoundry.co.uk
Fri Jan 4 10:26:45 PST 2008
Behdad Esfahbod wrote:
> On Thu, 2008-01-03 at 22:28 -0500, Bill Spitzak wrote:
>> In truth this only looks useful to make the same results that Cairo does
>> with radial gradients. Shapes that are not round are pretty useless due
>> to Mach banding (this is the starburst rays you see). However I can
>> certainly see that this is a more convienent way to specify a radial
>> gradient.
>
> Another interesting feature of the path gradients in the links is that
> one can also have color stop along the path (that is, along the circle),
> 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 of
the examples show. Does it only change the last step, or is there an api
to change all the steps?
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 be
specified twice and what happens if the two paths are different.
More information about the cairo
mailing list