diff options
author | 2013-04-26 21:43:29 +0000 | |
---|---|---|
committer | 2013-04-26 21:43:29 +0000 | |
commit | b16e247519b9b8ccff1c74cf31d0c59f42b6a5f2 (patch) | |
tree | d7030d0ec65c6bc8ecbc67f60294ac12d0285c08 /src/core/SkGeometry.cpp | |
parent | e23b4a4f9e82329ba305e190ddd1f17c4746ca96 (diff) |
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
Diffstat (limited to 'src/core/SkGeometry.cpp')
-rw-r--r-- | src/core/SkGeometry.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp index 688445826d..14e4fa2bf7 100644 --- a/src/core/SkGeometry.cpp +++ b/src/core/SkGeometry.cpp @@ -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)) + */ + |