shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@7303 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Intersection/CubicUtilities.cpp b/experimental/Intersection/CubicUtilities.cpp
index 36fc17e..19f16c6 100644
--- a/experimental/Intersection/CubicUtilities.cpp
+++ b/experimental/Intersection/CubicUtilities.cpp
@@ -18,6 +18,15 @@
return (width > height ? width : height) / precisionUnit;
}
+#if SK_DEBUG
+double calcPrecision(const Cubic& cubic, double t, double scale) {
+ Cubic part;
+ sub_divide(cubic, SkMax32(0, t - scale), SkMin32(1, t + scale), part);
+ return calcPrecision(part);
+}
+#endif
+
+
void coefficients(const double* cubic, double& A, double& B, double& C, double& D) {
A = cubic[6]; // d
B = cubic[4] * 3; // 3*c