• 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: Gideon King <email@hidden>
  • Date: Sun, 7 Nov 2010 11:36:21 +1000

Sorry, I must have not been clear - these are not before and after curve definitions. They are two approaches I tried. First I was using the curve to approach, and when that wasn't working nicely, I tried the quad curve.

On 07/11/2010, at 11:11 AM, David Duncan wrote:

> 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: David Duncan <email@hidden>
References: 
 >CAShapeLayer curved path animation (From: Gideon King <email@hidden>)
 >Re: CAShapeLayer curved path animation (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Interrupt copyItemAtPath
  • Next by Date: Understanding the Run loop idea and the updating of controls during long operations
  • Previous by thread: Re: CAShapeLayer curved path animation
  • Next by thread: Re: CAShapeLayer curved path animation
  • Index(es):
    • Date
    • Thread