[cairo] Radial Patterns Repeat Radially
Bill Spitzak
spitzak at gmail.com
Thu Mar 12 16:27:40 PDT 2015
Looking at that file there are a lot of other "len--" calls in there,
all of them will fail if the len is negative. Possibly they should all
be fixed. Also in many cases there is a "if (len > 16) ... else ..." and
maybe that else should say "else if len > 0 ...".
On 03/12/2015 04:19 PM, Lawrence D'Oliveiro wrote:
> On Thu, 12 Mar 2015 12:52:24 +0100, Andrea Canciani wrote:
>
>> Gradients (as opposed to surface-based patterns) lack of a natural
>> notion of tile.
>> Linear gradients are quite simple and their current description might
>> already be sufficient to provide the intuition of their behavior.
>
> I have added another example
> <https://github.com/ldo/qahirah_examples/blob/master/gradient_patterns>
> to my qahirah_examples repo to demonstrate the repeat behaviour of
> linear and radial gradients.
>
> It doesn’t seem that hard to understand: linear gradients repeat in
> steps of (x1 - x0) along the x axis and (y1 - y0) along the y axis.
> Radial gradients extrapolate the radius steps in integer multiples of
> (radius1 - radius0), and the centre position steps in integer multiples
> of (cx1 - cx0, cy1 - cy0).
>
> Does that sound right? I get some interesting effects when the step in
> the radius almost, but not quite, cancels out the step in the circle
> centres. :)
>
More information about the cairo
mailing list