| Index: src/pathops/SkIntersectionHelper.h
|
| diff --git a/src/pathops/SkIntersectionHelper.h b/src/pathops/SkIntersectionHelper.h
|
| index 1a4b1f044145e70054cc125033284b4c47dd56dd..f5eeaf8813db7e3649d0b0bcb647f9c703666b42 100644
|
| --- a/src/pathops/SkIntersectionHelper.h
|
| +++ b/src/pathops/SkIntersectionHelper.h
|
| @@ -7,6 +7,10 @@
|
| #include "SkOpContour.h"
|
| #include "SkPath.h"
|
|
|
| +#if SK_DEBUG
|
| +#include "SkPathOpsPoint.h"
|
| +#endif
|
| +
|
| class SkIntersectionHelper {
|
| public:
|
| enum SegmentType {
|
| @@ -81,6 +85,14 @@ public:
|
| return midPtByT.approximatelyEqual(midPtByAvg);
|
| }
|
|
|
| + bool isPartial(double t1, double t2, const SkDPoint& pt1, const SkDPoint& pt2) const {
|
| + const SkOpSegment& segment = fContour->segments()[fIndex];
|
| + double mid = (t1 + t2) / 2;
|
| + SkDPoint midPtByT = segment.dPtAtT(mid);
|
| + SkDPoint midPtByAvg = SkDPoint::Mid(pt1, pt2);
|
| + return midPtByT.approximatelyPEqual(midPtByAvg);
|
| + }
|
| +
|
| SkScalar left() const {
|
| return bounds().fLeft;
|
| }
|
| @@ -137,6 +149,19 @@ public:
|
| return y() != pts()[0].fY;
|
| }
|
|
|
| +#ifdef SK_DEBUG
|
| + void dump() {
|
| + SkDPoint::dump(pts()[0]);
|
| + SkDPoint::dump(pts()[1]);
|
| + if (verb() >= SkPath::kQuad_Verb) {
|
| + SkDPoint::dump(pts()[2]);
|
| + }
|
| + if (verb() >= SkPath::kCubic_Verb) {
|
| + SkDPoint::dump(pts()[3]);
|
| + }
|
| + }
|
| +#endif
|
| +
|
| private:
|
| SkOpContour* fContour;
|
| int fIndex;
|
|
|