[cairo] cairo_get_clip_as_rectangles

Robert O'Callahan rocallahan at novell.com
Tue Jun 27 22:06:57 PDT 2006


Attached is a patch for my next attempt at getting the clip as a
rectangle list.

The basic ideas here, suggested by Carl, are
a) always return rectangles in user coordinates
b) always return some rectangle list which contains the true clip area
c) return an extra bit of information indicating whether the returned
rectangle list is exactly equal to the true clip area

This is simple to implement and IMHO ends up looking very elegant.

The attached tests assume that the backend uses pixman regions, and test
for accuracy on that basis. Thus they fail for the SVG backend which
doesn't have such accurate information available. Curiously, they
succeed for the Postscript backend. I'm not sure how to deal with this;
I'd like to test with different expectations for different backends.

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 10903 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060628/3713c124/patch.bin


More information about the cairo mailing list