add comment for computing max-diff between conic and its bounding quad

git-svn-id: http://skia.googlecode.com/svn/trunk@8885 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-04-26 21:43:29 +00:00
parent e23b4a4f9e
commit b16e247519

View File

@ -1654,3 +1654,14 @@ void SkConic::computeTightBounds(SkRect* bounds) const {
void SkConic::computeFastBounds(SkRect* bounds) const {
bounds->set(fPts, 3);
}
/*
* "High order approximation of conic sections by quadratic splines"
* by Michael Floater, 1993
*
* Max error between conic and simple quad is bounded by this equation
*
* a <-- w - 1 (where w >= 0)
* diff <-- a * (p0 - 2p1 + p2) / (4*(2 + a))
*/