Re: [PATCH] stroke_extents: Use a polygon instead of traps

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Fri, Jun 14, 2013 at 03:18:10PM +0200, Uli Schlachter wrote:
> Instead of calculating the extents of a cairo_path_fixed_t by converting it into
> traps and getting the traps' extents, this patch implements this operation via
> converting to a polygon and using the polygon's extents.
> 
> This fixes the "get-path-extents" test without breaking anything else. IMHO this
> commit papers over a bug from commit 3cf6551ac7 (see bugzilla), but I am not
> really sure and can only guess.

Yes, the bug is in the expectations of the test case; we are expecting
Cairo to provide a perfect result, but Cairo is working to a specified
tolerance. This tolerance allows it to skip many stages of refinement
and cuts down on its overhead, but also incurs a loss of geometric
precision. I fixed the test case to respect the tolerance that it asks
of Cairo.

This patch is an improvement that avoids the intermediate
trapezoidation.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.