removed a call to CGContextClosePath in drawInContext that was generating an err…
…or message - according to Apple's documentation, DrawPath closes the path if it's a filled style, so a call to ClosePath isn't necessary
Showing
1 changed file
with
2 additions
and
3 deletions
@@ -150,8 +150,6 @@ | @@ -150,8 +150,6 @@ | ||
150 | { | 150 | { |
151 | renderedScale = [contents scale]; | 151 | renderedScale = [contents scale]; |
152 | 152 | ||
153 | -// CGContextFillRect(theContext, self.bounds);//CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)); | ||
154 | - | ||
155 | float scale = 1.0f / [contents scale]; | 153 | float scale = 1.0f / [contents scale]; |
156 | 154 | ||
157 | CGContextScaleCTM(theContext, scale, scale); | 155 | CGContextScaleCTM(theContext, scale, scale); |
@@ -162,8 +160,9 @@ | @@ -162,8 +160,9 @@ | ||
162 | CGContextSetLineWidth(theContext, lineWidth); | 160 | CGContextSetLineWidth(theContext, lineWidth); |
163 | CGContextSetStrokeColorWithColor(theContext, [lineColor CGColor]); | 161 | CGContextSetStrokeColorWithColor(theContext, [lineColor CGColor]); |
164 | CGContextSetFillColorWithColor(theContext, [fillColor CGColor]); | 162 | CGContextSetFillColorWithColor(theContext, [fillColor CGColor]); |
163 | + | ||
164 | + // according to Apple's documentation, DrawPath closes the path if it's a filled style, so a call to ClosePath isn't necessary | ||
165 | CGContextDrawPath(theContext, drawingMode); | 165 | CGContextDrawPath(theContext, drawingMode); |
166 | - CGContextClosePath(theContext); | ||
167 | } | 166 | } |
168 | 167 | ||
169 | - (void) closePath | 168 | - (void) closePath |
-
Please register or login to post a comment