From c9e40cbfba0c35c4fcf7bd495d24b0458bc7074d Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Sun, 31 May 2009 13:06:50 -0700 Subject: [PATCH] Fix for a change in CGContextAddEllipseInRect that was breaking existing core graphics code --- AppKit/CoreGraphics/CGContext.j | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AppKit/CoreGraphics/CGContext.j b/AppKit/CoreGraphics/CGContext.j index ba034d66f..a56d20e4d 100644 --- a/AppKit/CoreGraphics/CGContext.j +++ b/AppKit/CoreGraphics/CGContext.j @@ -548,7 +548,9 @@ var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0); */ function CGContextAddEllipseInRect(aContext, aRect) { + CGContextBeginPath(aContext); CGContextAddPath(aContext, CGPathWithEllipseInRect(aRect)); + CGContextClosePath(aContext); } /*! @@ -658,7 +660,9 @@ function CGContextSetStrokeColor(aContext, aColor) */ function CGContextFillRoundedRectangleInRect(aContext, aRect, aRadius, ne, se, sw, nw) { - CGContextAddPath(aContext, CGPathWithRoundedRectangleInRect(aRect, aRadius, aRadius, ne, se, sw, nw)); + CGContextBeginPath(aContext); + CGContextAddPath(aContext, CGPathWithRoundedRectangleInRect(aRect, aRadius, aRadius, ne, se, sw, nw)); + CGContextClosePath(aContext); CGContextFillPath(aContext); } @@ -675,7 +679,9 @@ function CGContextFillRoundedRectangleInRect(aContext, aRect, aRadius, ne, se, s */ function CGContextStrokeRoundedRectangleInRect(aContext, aRect, aRadius, ne, se, sw, nw) { + CGContextBeginPath(aContext); CGContextAddPath(aContext, CGPathWithRoundedRectangleInRect(aRect, aRadius, aRadius, ne, se, sw, nw)); + CGContextClosePath(aContext); CGContextStrokePath(aContext); }