diff options
author | 2015-04-24 09:08:57 -0700 | |
---|---|---|
committer | 2015-04-24 09:08:57 -0700 | |
commit | 08bc8488fa2ea2d2a17efb1443f0ec6579d5a3c8 (patch) | |
tree | 9dbc81feaac0b80700e3fb7bc032adef3f1e062c /src/pathops/SkOpContour.h | |
parent | e062db9cc6478745138cca964ee46839e413ab7b (diff) |
fix multiple intersection logic
When three or more curves intersect at the same point, ensure that
each curve records the intersections of the others. This fixes a
number of cubic tests.
TBR=reed@google.com
BUG=skia:3588
Review URL: https://codereview.chromium.org/1105943002
Diffstat (limited to 'src/pathops/SkOpContour.h')
-rw-r--r-- | src/pathops/SkOpContour.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h index c86f27b22e..3d26ae84c8 100644 --- a/src/pathops/SkOpContour.h +++ b/src/pathops/SkOpContour.h @@ -211,17 +211,23 @@ public: } while ((segment = segment->next())); } - bool moveNearby() { + bool moveMultiples() { SkASSERT(fCount > 0); SkOpSegment* segment = &fHead; do { - if (!segment->moveNearby()) { - return false; - } + segment->moveMultiples(); } while ((segment = segment->next())); return true; } + void moveNearby() { + SkASSERT(fCount > 0); + SkOpSegment* segment = &fHead; + do { + segment->moveNearby(); + } while ((segment = segment->next())); + } + SkOpContour* next() { return fNext; } |