[cairo] [PATCH] Update clipping surface when clipping repeatedly

Kristian Høgsberg krh at bitplanet.net
Fri Jun 3 09:10:52 PDT 2005


Here's a patch to make _cairo_gstate_clip() replace the clipping surface 
to a new surface, the size of the intersection of the previous clip 
surface and the extents of the new clip path.  The current approach 
doesn't work when the extents of a new clip path is well contained in 
the current clip surface.  When rasterizing the trapezoids for the new 
clip with the IN operator, libpixman only touches the pixels within the 
bounding box of the trapezoids, which gives us this clipping bug:


The attached patch works around the problem by creating a new surface 
the size of the intersection and renders the new mask to that.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: shrink-clip-surface.patch
Type: text/x-diff
Size: 4517 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050603/62042874/shrink-clip-surface.bin

More information about the cairo mailing list