Add an SkPath conic conversion utility.
Expose SkConic::chopIntoQuadsPOW2() as SkPath::ConvertConicToQuads().
BUG=chromium:315277
R=reed@google.com
Review URL: https://codereview.chromium.org/1484373002
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 2d4976a..351629d 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2837,3 +2837,9 @@
}
return SkToBool(w);
}
+
+int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
+ SkScalar w, SkPoint pts[], int pow2) {
+ const SkConic conic(p0, p1, p2, w);
+ return conic.chopIntoQuadsPOW2(pts, pow2);
+}