[cairo] Analytical curve bounds
Behdad Esfahbod
behdad at behdad.org
Sat Dec 27 20:54:05 PST 2008
Hi,
I just pushed a commit to use analytical curve bounds instead of decomposing
them. Would be good to get some perf data. Here is the commit message:
commit ef0f6c3ca311c41c9062e1298b020eae1212984e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Dec 27 23:13:45 2008 -0500
[spline] Add an analytical bounder for splines
The way this works is very simple: Once for X, and once for Y, it
takes the derivative of the bezier equation, equals it to zero and
solves to find the extreme points, and if the extreme points are
interesting, adds them to the bounder.
Not the fastest algorithm out there, but my estimate is that if
_de_casteljau() ends up breaking a stroke in at least 10 pieces,
then the new bounder is faster. Would be good to see some real
perf data.
More information about the cairo
mailing list