[cairo] Strange pattern (gradient) behavior (cairo bug?)

Jan Słupski jslupski at juljas.net
Thu Jul 9 02:58:30 PDT 2009


Hi,

I'm trying to figure out why two nearly the same pictures draws differently.
I suspect that this can be a cairo bug, but maybe I'm just doing something wrong.

See attached example -

The code for pass=0 (upper rectangle) and pass=1 (lower rectangle) is almost
identical - just little difference on scaling matrix applied to the pattern.
But result of that change (image attached) is quite serious.
Moreover - exporting to SVG does not show that difference between two rectangles.

The code is little obscure, because it is (as much as I could) trimmed down
output of libcairowrap.

Note the second pattern that is supposed to be an ellipse radial pattern,
but all pattern stops are - for testing - made black and 100% transparent.
Disabling it (do_second_pattern=0) changes the output to correct one.

Any ideas?

Thanks!

Jan Slupski

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovalgradient.c
Type: text/x-csrc
Size: 1706 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090709/b8fc4c3b/attachment.c 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovalgradient.png
Type: image/png
Size: 3389 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090709/b8fc4c3b/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovalgradient-do_second_pattern=0.png
Type: image/png
Size: 3402 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090709/b8fc4c3b/attachment-0001.png 


More information about the cairo mailing list