[cairo] fixing cairo_(fill,stroke)_extents [patch]

Robert O'Callahan rocallahan at novell.com
Wed Sep 13 20:19:37 PDT 2006


cairo_fill/stroke_extents don't transform coordinates properly and can
return incorrect extents. They need to call
_cairo_matrix_transform_bounding_box. 

They also don't handle the "no path" case well. cairo_stroke_extents
returns something odd when it should just return something empty (e.g.
x1,y1=x2,y2=0,0.) cairo_fill_extents also returns something odd. I'm
actually not sure what it *should* return, but for now I'm having it
return the surface extents.

For the clip-getters patch which is coming up, I needed to add an
is_tight output to _cairo_matrix_transform_bounding_box, and because I'm
too lazy to reconstruct these fill/stroke_extents fixes without that
change, I'm including it here as the first patch to commit.

For bonus points, I added doc-comments for cairo_fill/stroke_extents.

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbox-tightness.patch
Type: text/x-patch
Size: 1859 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060914/e31f04d7/bbox-tightness.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extents-fixes.patch
Type: text/x-patch
Size: 3894 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060914/e31f04d7/extents-fixes.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extents-docs.patch
Type: text/x-patch
Size: 1508 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060914/e31f04d7/extents-docs.bin


More information about the cairo mailing list