[cairo] Use _cairo_rectangle_intersect in more places for intersection checking

BJörn Lindqvist bjourne at gmail.com
Mon Oct 22 15:52:46 PDT 2007


Hello,

Here is two patches, the first modifies _cairo_rectangle_intersect()
so that TRUE or FALSE is returned whether the rectangles intersect or
not. Just like about five million other rectangle intersection
functions work.

Which is important for the second patch that modifies all
_cairo_*_get_image() functions so that they now use the
_cairo_rectangle_intersect() function for doing intersection checking
instead of spelling it out themselves.

The benefit is that quite a few lines of code are removed. I also
added some docstrings to some touched functions because I found it
hard to tell what those functions were doing.


-- 
mvh Björn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rectangle-intersect-return-status.patch
Type: text/x-patch
Size: 1760 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071022/335e68c4/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-rectangle-intersect.patch
Type: text/x-patch
Size: 15766 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071022/335e68c4/attachment-0003.bin 


More information about the cairo mailing list