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

Unified Diff: src/svg/SkSVGDevice.cpp

Issue 2311333002: [SVGDevice] Observe even-odd path fills (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/SkSVGDevice.cpp
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp
index 3ba721ee3902ae4621ee77329f7b91d6111aacf7..d4d18da83faac8be97d0aeb91d03d2141722a3bf 100644
--- a/src/svg/SkSVGDevice.cpp
+++ b/src/svg/SkSVGDevice.cpp
@@ -652,6 +652,11 @@ void SkSVGDevice::drawPath(const SkDraw& draw, const SkPath& path, const SkPaint
const SkMatrix* prePathMatrix, bool pathIsMutable) {
AutoElement elem("path", fWriter, fResourceBucket, draw, paint);
elem.addPathAttributes(path);
+
+ // TODO: inverse fill types?
+ if (path.getFillType() == SkPath::kEvenOdd_FillType) {
+ elem.addAttribute("fill-rule", "evenodd");
+ }
}
void SkSVGDevice::drawBitmapCommon(const SkDraw& draw, const SkBitmap& bm,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698