Index: src/core/SkStroke.cpp |
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp |
index b138c326bab497c96429ed1d111ff57954c8ab0d..7d8d707752e942982ce51f01af4e7eebe256249b 100644 |
--- a/src/core/SkStroke.cpp |
+++ b/src/core/SkStroke.cpp |
@@ -562,8 +562,9 @@ void SkStroke::strokePath(const SkPath& src, SkPath* dst) const { |
SkPath::Direction dir; |
if (src.isRect(&isClosed, &dir) && isClosed) { |
this->strokeRect(src.getBounds(), dst, dir); |
- // our answer should preserve the inverseness of the src |
- if (src.isInverseFillType()) { |
+ // our answer should preserve the inverseness of the src, but the |
+ // rect should not be inverse-stroked. |
+ if (src.isInverseFillType() && fWidth < 0) { |
SkASSERT(!dst->isInverseFillType()); |
dst->toggleInverseFillType(); |
} |
@@ -646,8 +647,9 @@ DONE: |
#endif |
} |
- // our answer should preserve the inverseness of the src |
- if (src.isInverseFillType()) { |
+ // our answer should preserve the inverseness of the src, but the path |
+ // should not be inverse-stroked. |
+ if (src.isInverseFillType() && fWidth < 0) { |
SkASSERT(!dst->isInverseFillType()); |
dst->toggleInverseFillType(); |
} |