[cairo] API request: obtain the trapezoids that are outside of
the surface
Bill Spitzak
spitzak at d2.com
Tue Aug 24 15:01:37 PDT 2004
On Wednesday 18 August 2004 08:58 am, Carl Worth wrote:
> It is very easy to generate a correct bounding box, (which the shape is
> guaranteed not to exceed), but it won't necessarily be tight. Here are
> the insights necessary, (beyond trivial things like filling with
> straight line segments)...
I agree that this is the sort of algorithim that should be used.
However it might be best to define Cairo as returning some box that surrounds
the filled area, and that the exact algorithim is implementation-defined, and
it may return something smaller than the control points. If somebody figures
out a fast way to get a tighter box then they should be able to put it in a
Cairo implementation.
It may be a good idea to define the returned result as surrounding the path
drawn at infinite precision however. An algorithim that flattens the path and
then finds the bounding box is not correct unless it expands the box enough
to surround any small curves that were cut off by the flattening.
More information about the cairo
mailing list