add filleRule for ios

This commit is contained in:
Horcrux
2016-04-20 23:27:12 +08:00
parent c4a185354a
commit a136063f90
12 changed files with 53 additions and 6 deletions
+3 -1
View File
@@ -35,7 +35,7 @@
CGPathDrawingMode mode = kCGPathStroke;
if (self.fill) {
if ([self.fill applyFillColor:context]) {
mode = kCGPathFill;
mode = self.fillRule == kARTCGFillRuleEvenodd ? kCGPathEOFill : kCGPathFill;
} else {
CGContextSaveGState(context);
CGContextAddPath(context, self.d);
@@ -58,6 +58,8 @@
}
if (mode == kCGPathFill) {
mode = kCGPathFillStroke;
} else if (mode == kCGPathEOFill) {
mode = kCGPathEOFillStroke;
}
}