Re: CAShapeLayer for Drawing Lines; Animations Skewed
Re: CAShapeLayer for Drawing Lines; Animations Skewed
- Subject: Re: CAShapeLayer for Drawing Lines; Animations Skewed
- From: John Harper <email@hidden>
- Date: Thu, 10 Sep 2009 21:31:00 -0700
On Sep 10, 2009, at 7:20 PM, Christopher J Kemsley wrote:
CAShapeLayer with Path from PointA to PointB
In this method, I used a CAShapeLayer with the correct color and a
1px width. I made a path between the two points.
For moves, I created another path representing the new position and
used a CABasicAnimation to animate the "path" property.
This also 'works,' but also has a side-effect: A line, instead of
animating from (oldPointA,oldPointB) to (newPointA,newPointB) would
animate to (oldPointA,oldPointB) to (randomPoint,randomPoint) to
(newPointA,newPointB) (Note: (aPoint,bPoint) represents a
line/path from aPoint to bPoint)
yes, that looks like a bug, please file a radar so we can track it. (bugreport.apple.com
)
for now I think you can get the right result by giving each line three
points instead of two, the easiest way to do that is just add an extra
point with the same coordinates as the end point.
John
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden