[cairo] [patch] _cairo_clip_intersect_mask should set the clip mode

Jonathan Watt jwatt at jwatt.org
Mon Mar 17 11:33:32 PDT 2008


Jonathan Watt wrote:
> Jonathan Watt wrote:
>> I've just been debugging an SVG bug in Mozilla [1] and discovered that the
>> source of the problem is _cairo_clip_intersect_mask failing to set the 'mode'
>> member on the new clip to CAIRO_CLIP_MODE_MASK. Seems like this should happen as
>> the first line after 'DONE:'.
> 
> Here's that change as a patch. Can someone push this if it looks okay?

And here's an SVG testcase as requested on IRC. The PNG is inline in the SVG as
a 'data' URI, but I've also attached it here separately.

The PNG embedded in the testcase should show as a square; the left half of it
red, the right half blue. The 2x2 px PNG is scaled up by the SVG. What happens
is that most of the image is clipped away and you only see a thin red vertical
rectangle (the left side of the PNG) instead of a dual color square.

Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opacity-g.svg
Type: image/svg+xml
Size: 560 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080317/12da2e07/attachment.svg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: red-blue.png
Type: image/png
Size: 147 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080317/12da2e07/attachment.png 


More information about the cairo mailing list