[cairo] [cairo-commit] 13 commits - doc/tutorial src/cairo-analysis-surface.c src/cairo-clip.c src/cairo-image-surface.c src/cairoint.h src/cairo-meta-surface.c src/cairo-paginated-surface.c src/cairo-path-bounds.c src/cairo-pattern.c src/cairo-pdf-surface.c src/cairo-rectangle.c src/cairo-scaled-font.c src/cairo-script-surface.c src/cairo-surface.c src/cairo-surface-fallback.c src/cairo-svg-surface.c src/cairo-type3-glyph-surface.c src/cairo-xlib-surface.c src/test-meta-surface.c src/test-paginated-surface.c test/twin.c test/twin.pdf.ref.png test/twin.ref.png util/cairo-script util/cairo-trace

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 18 06:36:47 PST 2008


On Thu, 2008-12-18 at 09:25 -0500, Jeff Muizelaar wrote:
> On Thu, Dec 18, 2008 at 04:12:50AM -0800, Chris Wilson wrote:
> > New commits:
> > commit dea40e61babe608315b6d365094cf518814b134e
> > Author: Chris Wilson <chris at chris-wilson.co.uk>
> > Date:   Thu Dec 18 11:50:00 2008 +0000
> > 
> >     [path] Return the fixed-point bounds of the path
> >     
> >     When analysing the stroke extents, we need the original fixed-point
> >     extents so that we do not incur an OBO when we round-to-integer a second
> >     time. We also need a more accurate estimate than simply using the control
> >     points of the curve, so pass in tolerance and decompose until someone
> >     discovers a cheaper algorithm to determine the precise aligned bounding
> >     box of a bezier curve.
> > 
> 
> With this patch I don't think _cairo_path_fixed_approximate_extents and
> the comment above it make sense any more. Also, are we sure we don't want a
> version that just uses the control points any more?

I only introduced it a short while ago ;-) The primarily motivation is
to avoid tessellation simply to compute the extents. Using the control
points can give gross exaggeration of the bounds, which is at odds with
its use by user-font via the analysis surface. But when computing clip
extents (of a clip path) we only care about rough estimates...

> Should this be in a function like
> _cairo_path_fixed_approximate_stroke_extents?

Possibly and then we can switch back to returning a
cairo_rectangle_int_t and kill the auxiliary function. 
-- 
Chris



More information about the cairo mailing list