• 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
Converting CGPathAddArcToPoint (or NSBezierPath equivalent) to a fixed number of CGPathAddCurveToPoint calls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting CGPathAddArcToPoint (or NSBezierPath equivalent) to a fixed number of CGPathAddCurveToPoint calls


  • Subject: Converting CGPathAddArcToPoint (or NSBezierPath equivalent) to a fixed number of CGPathAddCurveToPoint calls
  • From: Gideon King <email@hidden>
  • Date: Tue, 01 May 2012 08:26:03 +1000

Hi, I am using the CAShapeLayer's ability to animate a path, but the start and end path need to have the same number of segments.

I have been using CGPathAddArcToPoint to add the curves to my path. That translates to CGPathAddCurveToPoint calls behind the scenes, but sometimes it adds one curve and sometimes two, which means that the curve can't be animated.

I therefore need to be able to approximate the arc with the same number of CGPathAddCurveToPoint calls each time (presumably 2 or 3).

Has anyone done this already either with CGPaths or NSBezierPaths? Any pointers would be most welcome.


Thanks

Gideon








_______________________________________________

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

  • Prev by Date: Re: Tracking down SIGABRTs
  • Next by Date: Any clues on what could cause this crash?
  • Previous by thread: Modal-loop Event-handling question
  • Next by thread: Any clues on what could cause this crash?
  • Index(es):
    • Date
    • Thread