[cairo] Extents of degenerate paths

Behdad Esfahbod behdad at behdad.org
Mon May 7 17:07:15 PDT 2007

On Mon, 2007-05-07 at 14:46 -0400, T Rowley wrote:
> In Mozilla SVG, I've run across the case where the code needs to check 
> the extents of a single diagonal line.  With stroke_width set to zero I 
> get back 0,0,0,0 rather than the a tight bounding box for the line.
> Investigating other cases I see similar results - testcase code 
> attached.  While the fill extent cases could be argued correct in 
> returning 0,0,0,0 (should be documented if this is the intended result), 
> it seems that the line extents should be a bounding box for the path.

I think the current output is correct and should be documented.  Also
may make sense to add cairo_path_extents() to do what you want.


"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

More information about the cairo mailing list