Index: src/pathops/SkOpContour.cpp |
diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp |
index 178ba3e89ccc34fb921c03a4251ceec75af70944..18b6328a7e2f815e949baf60a8b8790dcc236de2 100644 |
--- a/src/pathops/SkOpContour.cpp |
+++ b/src/pathops/SkOpContour.cpp |
@@ -47,6 +47,16 @@ void SkOpContour::toPath(SkPathWriter* path) const { |
path->close(); |
} |
+void SkOpContour::toReversePath(SkPathWriter* path) const { |
+ const SkPoint& pt = fTail->pts()[0]; |
+ path->deferredMove(pt); |
+ const SkOpSegment* segment = fTail; |
+ do { |
+ segment->addCurveTo(segment->tail(), segment->head(), path, true); |
+ } while ((segment = segment->prev())); |
+ path->close(); |
+} |
+ |
SkOpSegment* SkOpContour::undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr) { |
SkOpSegment* segment = &fHead; |
do { |