diff --git a/ChangeLog b/ChangeLog index 53f3ff2c9..75d9c5752 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 17 21:15:00 2000 Enrico Sersale + + * Source/NSBezierPath.m (-elementTypeAtIndex:associatedPoints:]): + Changed to set the associatedPoints correctly. + Mon Jan 17 6:32:00 1999 Richard Frith-Macdonald * Source/NSBundleAdditions.m: Catch exceptions when loading nib so diff --git a/Source/NSBezierPath.m b/Source/NSBezierPath.m index 4b87f2edf..a82d51696 100644 --- a/Source/NSBezierPath.m +++ b/Source/NSBezierPath.m @@ -777,8 +777,22 @@ NSPoint rotatePoint(NSPoint p, NSPoint centre, float angle); associatedPoints:(NSPoint *)points { PathElement *elm = [pathElements objectAtIndex: index]; - points = [elm points]; - return [elm type]; + NSBezierPathElementType type = [elm type]; + NSPoint *p = [elm points]; + + if(type == NSBezierPathElementMoveTo || type == NSBezierPathElementLineTo) { + points[0].x = p[0].x; + points[0].y = p[0].y; + } else if(type == NSBezierPathElementCurveTo) { + points[0].x = p[0].x; + points[0].y = p[0].y; + points[1].x = p[1].x; + points[1].y = p[1].y; + points[2].x = p[2].x; + points[2].y = p[2].y; + } + + return type; } - (void)removeLastElement