add comment for computing max-diff between conic and its bounding quad
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 26 Apr 2013 21:43:29 +0000 (21:43 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 26 Apr 2013 21:43:29 +0000 (21:43 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@8885 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkGeometry.cpp

index 6884458..14e4fa2 100644 (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))
+ */
+