diff options
author | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-02 14:49:34 +0000 |
---|---|---|
committer | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-02 14:49:34 +0000 |
commit | 7eaa53d8f7e48fd17d02b5e3bd91f90e9c1899ef (patch) | |
tree | 057de94d997d99e897c68157f7444fbca687ebf9 /src/pathops/SkIntersectionHelper.h | |
parent | 77af6805e5faea1e2a5c0220098aec9082f3a6e5 (diff) |
path ops work in progress
make more skps work
remove edit files
BUG=
Review URL: https://codereview.chromium.org/23542056
git-svn-id: http://skia.googlecode.com/svn/trunk@11570 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pathops/SkIntersectionHelper.h')
-rw-r--r-- | src/pathops/SkIntersectionHelper.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pathops/SkIntersectionHelper.h b/src/pathops/SkIntersectionHelper.h index af246b760e..1a4b1f0441 100644 --- a/src/pathops/SkIntersectionHelper.h +++ b/src/pathops/SkIntersectionHelper.h @@ -17,8 +17,8 @@ public: kCubic_Segment = SkPath::kCubic_Verb, }; - void addCoincident(SkIntersectionHelper& other, const SkIntersections& ts, bool swap) { - fContour->addCoincident(fIndex, other.fContour, other.fIndex, ts, swap); + bool addCoincident(SkIntersectionHelper& other, const SkIntersections& ts, bool swap) { + return fContour->addCoincident(fIndex, other.fContour, other.fIndex, ts, swap); } // FIXME: does it make sense to write otherIndex now if we're going to @@ -27,9 +27,10 @@ public: fContour->addOtherT(fIndex, index, otherT, otherIndex); } - void addPartialCoincident(SkIntersectionHelper& other, const SkIntersections& ts, int index, + bool addPartialCoincident(SkIntersectionHelper& other, const SkIntersections& ts, int index, bool swap) { - fContour->addPartialCoincident(fIndex, other.fContour, other.fIndex, ts, index, swap); + return fContour->addPartialCoincident(fIndex, other.fContour, other.fIndex, ts, index, + swap); } // Avoid collapsing t values that are close to the same since @@ -77,7 +78,7 @@ public: double mid = (t1 + t2) / 2; SkDPoint midPtByT = segment.dPtAtT(mid); SkDPoint midPtByAvg = SkDPoint::Mid(pt1, pt2); - return midPtByT.approximatelyEqualHalf(midPtByAvg); + return midPtByT.approximatelyEqual(midPtByAvg); } SkScalar left() const { |