Index: src/pathops/SkLineParameters.h |
diff --git a/src/pathops/SkLineParameters.h b/src/pathops/SkLineParameters.h |
index 8824e54bb11684f90e1154b0253978d333faba68..9cbd8524aa302c5a9fed1f60f49b1b64a9288a04 100644 |
--- a/src/pathops/SkLineParameters.h |
+++ b/src/pathops/SkLineParameters.h |
@@ -39,6 +39,14 @@ public: |
c = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; |
} |
+ double cubicPart(const SkDCubic& part) { |
+ cubicEndPoints(part); |
+ if (part[0] == part[1] || ((const SkDLine& ) part[0]).nearRay(part[2])) { |
+ return pointDistance(part[3]); |
+ } |
+ return pointDistance(part[2]); |
+ } |
+ |
void lineEndPoints(const SkDLine& pts) { |
a = pts[0].fY - pts[1].fY; |
b = pts[1].fX - pts[0].fX; |
@@ -58,6 +66,11 @@ public: |
c = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; |
} |
+ double quadPart(const SkDQuad& part) { |
+ quadEndPoints(part); |
+ return pointDistance(part[2]); |
+ } |
+ |
double normalSquared() const { |
return a * a + b * b; |
} |