From a0b9efe1fdc6db7026ce85fda238f49d82fd982f Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 26 Feb 2013 16:24:24 +0000 Subject: [PATCH] Fixed: CGPathMoveToPoint problem after a0115962. Without this fix, CGPathMoveToPoint would not actually move to the point if there had been at least one previous CGPath command (a current path existed) but it was not a move to point command. This fix ensures move to point is effective in all cases. Fixes #1801. --- AppKit/CoreGraphics/CGPath.j | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AppKit/CoreGraphics/CGPath.j b/AppKit/CoreGraphics/CGPath.j index 0bf89f679..fb01d5c34 100644 --- a/AppKit/CoreGraphics/CGPath.j +++ b/AppKit/CoreGraphics/CGPath.j @@ -318,10 +318,11 @@ function CGPathMoveToPoint(aPath, aTransform, x, y) { previous.x = point.x; previous.y = point.y; + return; } } - else - aPath.elements[aPath.count++] = { type:kCGPathElementMoveToPoint, x:point.x, y:point.y }; + + aPath.elements[aPath.count++] = { type:kCGPathElementMoveToPoint, x:point.x, y:point.y }; } var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0);