• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CAShapeLayer curved path animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CAShapeLayer curved path animation


  • Subject: Re: CAShapeLayer curved path animation
  • From: David Duncan <email@hidden>
  • Date: Sat, 6 Nov 2010 18:11:17 -0700

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 (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

  • Follow-Ups:
    • Re: CAShapeLayer curved path animation
      • From: Gideon King <email@hidden>
References: 
 >CAShapeLayer curved path animation (From: Gideon King <email@hidden>)

  • Prev by Date: Re: bouncing an NSScrollView like UIScrollView
  • Next by Date: NSOobject as ViewController and MVC architecture
  • Previous by thread: CAShapeLayer curved path animation
  • Next by thread: Re: CAShapeLayer curved path animation
  • Index(es):
    • Date
    • Thread