diff options
author | 2013-04-27 18:23:16 +0000 | |
---|---|---|
committer | 2013-04-27 18:23:16 +0000 | |
commit | 97514f22e4cb85a0d79b089a1eecd54d4a952291 (patch) | |
tree | 4a8ed76dd0482c647afdf01445a1cb4e0f6f042b /include | |
parent | 214c870f5e45f79bc5a8d695c55ec7b881535f4c (diff) |
add computation for error in conic-as-quad
git-svn-id: http://skia.googlecode.com/svn/trunk@8887 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkGeometry.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkGeometry.h b/include/core/SkGeometry.h index d540d34d27..97997c410a 100644 --- a/include/core/SkGeometry.h +++ b/include/core/SkGeometry.h @@ -220,6 +220,14 @@ struct SkConic { void chopAt(SkScalar t, SkConic dst[2]) const; void chop(SkConic dst[2]) const; + /** + * Return the max difference between the conic and its framing quadratic + * in err and return true. If the conic is degenerate (a line between + * pts[0] and pts[2]) or has a negative weight, return false and ignore + * the diff parameter. + */ + bool computeErrorAsQuad(SkVector* err) const; + int computeQuadPOW2(SkScalar tol) const; int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; |