[cairo] order of circles in radial gradients
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 5 00:27:39 PDT 2009
On Wed, 2009-08-05 at 16:29 +1200, Robert O'Callahan wrote:
> The Quartz backend treats the circles symmetrically, so it draws the
> gradient moving inward from the start circle to the end circle, with
> the first stop color filling outside the start circle and the last
> stop color filling inside the end circleThis seems a little more
> logical to me.
>
> What is the correct behaviour?
As you describe for Quartz, start colour outside with a ramp to end
colour inside. Unsurprisingly, this is also the expected behaviour for
PDF. I've recently fixed a bug in pixman for this issue:
commit 20d2df03059d6a5941464d80e81e8116ebf4dbfe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jul 23 19:08:40 2009 +0100
Fix inversion of radial gradients when r2 > r1
Fixes: Bug 22908 -- Invalid output of radial gradient
http://bugs.freedesktop.org/show_bug.cgi?id=22908
And I extended the radial gradient test case in cairo to cover these
conditions. I'd appreciate it if you could check the test case to make
sure I've not missed a condition, and check the output of a recent
pixman.
-ickle
More information about the cairo
mailing list