[cairo] Extension of the radial gradient test
emmanuel.pacaud at lapp.in2p3.fr
Wed Mar 7 14:54:08 PST 2007
Here's a patch that extends the current radial gradient tests with some
Additionnal tests are:
(a) a test with r0 > r1 ;
(b) a test with r0 == 0 and located on the outer circle edge ;
(c) a test where r1 / (r1 - r0) is not an integer, that may show issue
in rednering the content of the inner circle ;
(d) a test with r1 == r0.
The result with the image backend is here:
It looks like the image backend fails for (a) in the CAIRO_EXTEND_NONE
and CAIRO_EXTEND_PAD cases, and for (b) in all cases.
And the result with the SVG backend, rendered using batik is here:
It shows a failure in (c) for CAIRO_EXTEND_REFLECT.
Regarding the (d) test, for all extends except CAIRO_EXTEND_NONE, the
result is erased, since I'm not sure what to expect. The main goal is to
detect crashes in backend implementation.
During my recent work on radial gradient for the SVG backend, I tried to
take care of these corner cases. But I think (a) and (d) should be
handled by cairo before calling the backends, in order to avoid bugs in
each backend implementation.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3640 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070307/c9bf446a/cairo-radial-gradient-test.bin
More information about the cairo