[cairo] [RFC] cairo_path_extents()

Leon Woestenberg leon.woestenberg at gmail.com
Thu Nov 22 07:13:48 PST 2007


Hello,

On Nov 22, 2007 9:11 AM, Jonathan Watt <jwatt at jwatt.org> wrote:
> Baz wrote:
> > Behdad suggested adding a cairo_path_extents() call to meet their
> > need; to me this sounds like a better option than special-casing
> > stroke_extents or fill_extents for hairlines. The proposed api is:
> >
> > void        cairo_path_extents (cairo_t *cr,
> >                                              double *x1,
> >                                              double *y1,
> >                                              double *x2,
> >                                              double *y2);
> >
> > "Computes a bounding box in user coordinates covering the all points
> > on the current path. If the current path is empty, returns an empty
> > rectangle (0,0, 0,0). Stroke parameters, surface dimensions and
> > clipping are not taken into account."
>
> s/the all/all the/
>

"covering all the points on the current path"

What exactly are "all the points on the current path". Does this mean
the extents of the path, if it was traced by an infinitely small point
with an infinitely small curve error tolerance?

Is this function more performant than a stroke_extents()?

Regards,

Leon.


More information about the cairo mailing list