| Index: src/pathops/SkIntersectionHelper.h
|
| diff --git a/src/pathops/SkIntersectionHelper.h b/src/pathops/SkIntersectionHelper.h
|
| index 5d8ebcd5903292f568d0e0f17d6f03ced924b505..af246b760ebfa2cd22b7462efd70cfe02bb3e902 100644
|
| --- a/src/pathops/SkIntersectionHelper.h
|
| +++ b/src/pathops/SkIntersectionHelper.h
|
| @@ -27,24 +27,24 @@ public:
|
| fContour->addOtherT(fIndex, index, otherT, otherIndex);
|
| }
|
|
|
| + void addPartialCoincident(SkIntersectionHelper& other, const SkIntersections& ts, int index,
|
| + bool swap) {
|
| + fContour->addPartialCoincident(fIndex, other.fContour, other.fIndex, ts, index, swap);
|
| + }
|
| +
|
| // Avoid collapsing t values that are close to the same since
|
| // we walk ts to describe consecutive intersections. Since a pair of ts can
|
| // be nearly equal, any problems caused by this should be taken care
|
| // of later.
|
| // On the edge or out of range values are negative; add 2 to get end
|
| - int addT(const SkIntersectionHelper& other, const SkPoint& pt, double newT) {
|
| - return fContour->addT(fIndex, other.fContour, other.fIndex, pt, newT);
|
| + int addT(const SkIntersectionHelper& other, const SkPoint& pt, double newT, bool isNear) {
|
| + return fContour->addT(fIndex, other.fContour, other.fIndex, pt, newT, isNear);
|
| }
|
|
|
| int addSelfT(const SkIntersectionHelper& other, const SkPoint& pt, double newT) {
|
| return fContour->addSelfT(fIndex, other.fContour, other.fIndex, pt, newT);
|
| }
|
|
|
| - int addUnsortableT(const SkIntersectionHelper& other, bool start, const SkPoint& pt,
|
| - double newT) {
|
| - return fContour->addUnsortableT(fIndex, other.fContour, other.fIndex, start, pt, newT);
|
| - }
|
| -
|
| bool advance() {
|
| return ++fIndex < fLast;
|
| }
|
| @@ -72,6 +72,14 @@ public:
|
| && next.fIndex == fLast - 1;
|
| }
|
|
|
| + bool isNear(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.approximatelyEqualHalf(midPtByAvg);
|
| + }
|
| +
|
| SkScalar left() const {
|
| return bounds().fLeft;
|
| }
|
|
|