On Nov 6, 2010, at 4:41 PM, Gideon King wrote: > I'm using a CAShapeLayer, and the animation of the shape of the curved path I > am using is doing really strange things (It seems to work fine on straight > lines). I have tried: > > CGPathMoveToPoint(tempPath, NULL, startPoint.x, startPoint.y); > CGPathAddQuadCurveToPoint(tempPath, NULL, ctrl1.x, ctrl1.y, midPoint.x, > midPoint.y); > CGPathAddQuadCurveToPoint(tempPath, NULL, ctrl2.x, ctrl2.y, endPoint.x, > endPoint.y); > > and: > > CGPathMoveToPoint(tempPath, NULL, startPoint.x, startPoint.y); > CGPathAddCurveToPoint(tempPath, NULL, ctrl1.x, ctrl1.y, ctrl1.x, > ctrl1.y, midPoint.x, midPoint.y); > CGPathAddCurveToPoint(tempPath, NULL, ctrl2.x, ctrl2.y, ctrl2.x, > ctrl2.y, endPoint.x, endPoint.y);
These two paths are not structurally equivalent is the problem. You should be able to get something predictable by using AddCurveToPoint in both places, and to use the same location for both control points (which degenerates a Cubic curve to a Quadratic one). -- David Duncan _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com