[cairo] Mathematics question

Behdad Esfahbod behdad at behdad.org
Wed Nov 10 12:31:16 PST 2010


On 11/04/10 00:38, Jeff Muizelaar wrote:
> 
>> 3. When approximating curves to lines (flattening before
>> rasterization), how algorithm is used by cairo and how it competes to
>> the others? I found very interesting article (
>> http://www.cis.usouthal.edu/~hain/general/Publications/Bezier/Bezier%20Offset%20Curves.pdf
>>
>> ) that describes parabolic approximation. Is here anybody familiar
>> with this method?
> Cairo recursively subdivides a curve until the maximum distance
> (squared) between the control points B or C and the line A-D is less
> than the tolerance.
> 
> I've seen this paper before, but haven't tried implementing it to see
> how it compares.

There is an optimized heuristic implementation of that paper in FreeType
master now.  Worth taking a look at.

behdad


More information about the cairo mailing list