Index: src/pathops/SkPathOpsQuad.h |
diff --git a/src/pathops/SkPathOpsQuad.h b/src/pathops/SkPathOpsQuad.h |
index 81638cf0bc012c33d5a1b303680091fa410de25c..847c69cedde06f8d45d532d4dab89b6342ef5531 100644 |
--- a/src/pathops/SkPathOpsQuad.h |
+++ b/src/pathops/SkPathOpsQuad.h |
@@ -34,6 +34,10 @@ struct SkDQuad { |
return v02.dot(v01) > 0 && v02.dot(v12) > 0; |
} |
+ void debugInit() { |
+ sk_bzero(fPts, sizeof(fPts)); |
+ } |
+ |
SkDQuad flip() const { |
SkDQuad result = {{fPts[2], fPts[1], fPts[0]}}; |
return result; |
@@ -41,10 +45,11 @@ struct SkDQuad { |
static bool IsCubic() { return false; } |
- void set(const SkPoint pts[kPointCount]) { |
+ const SkDQuad& set(const SkPoint pts[kPointCount]) { |
fPts[0] = pts[0]; |
fPts[1] = pts[1]; |
fPts[2] = pts[2]; |
+ return *this; |
} |
const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } |
@@ -56,6 +61,8 @@ struct SkDQuad { |
SkDVector dxdyAtT(double t) const; |
static int FindExtrema(double a, double b, double c, double tValue[1]); |
bool hullIntersects(const SkDQuad& , bool* isLinear) const; |
+ bool hullIntersects(const SkDConic& , bool* isLinear) const; |
+ bool hullIntersects(const SkDCubic& , bool* isLinear) const; |
bool isLinear(int startIndex, int endIndex) const; |
bool monotonicInY() const; |
double nearestT(const SkDPoint&) const; |
@@ -77,6 +84,7 @@ struct SkDQuad { |
quad.set(pts); |
return quad.subDivide(a, c, t1, t2); |
} |
+ SkDConic toConic() const; |
SkDCubic toCubic() const; |
SkDPoint top(double startT, double endT) const; |