Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/pathops/SkPathOpsSimplify.cpp

Issue 14371011: path ops : add support for inverse fill (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/pathops/SkPathOpsSimplify.cpp
===================================================================
--- src/pathops/SkPathOpsSimplify.cpp (revision 8745)
+++ src/pathops/SkPathOpsSimplify.cpp (working copy)
@@ -149,7 +149,9 @@
#endif
// returns 1 for evenodd, -1 for winding, regardless of inverse-ness
result->reset();
- result->setFillType(SkPath::kEvenOdd_FillType);
+ SkPath::FillType fillType = path.isInverseFillType() ? SkPath::kInverseEvenOdd_FillType
+ : SkPath::kEvenOdd_FillType;
+ result->setFillType(fillType);
SkPathWriter simple(*result);
// turn path into list of segments
@@ -187,7 +189,7 @@
: !bridgeXor(contourList, &simple))
{ // if some edges could not be resolved, assemble remaining fragments
SkPath temp;
- temp.setFillType(SkPath::kEvenOdd_FillType);
+ temp.setFillType(fillType);
SkPathWriter assembled(temp);
Assemble(simple, &assembled);
*result = *assembled.nativePath();

Powered by Google App Engine
This is Rietveld 408576698