• 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
Animate a CGPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Animate a CGPath


  • Subject: Animate a CGPath
  • From: "Daniel Weber" <email@hidden>
  • Date: Thu, 11 Sep 2008 12:21:24 -0700

Hi everyone. I have an NSView with some appkit drawing code that I'm trying
to convert to core graphics drawing code. One thing I'm having trouble with
is the transition from NSBezierPath to CGPath. Basically in my application,
I want to animate the drawing a curve. In other words, I want to show the
path being drawn over a relatively long period of time (about 2 seconds).
When I was using NSBezierPath, I would do this by first flattening the path,
then using a timer to call the draw method to draw elements 0 to 1, then 0
to 2, then 0 to 3, and so on until I reached the end of the curve. The
effect was that the user could see the curve being "animated". Is there a
way to "flatten" a CGPath? Is there another way to do this in Core Graphics?
Any ideas would be much appreciated.

Thanks,
Dan
_______________________________________________

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: Animate a CGPath
      • From: David Duncan <email@hidden>
  • Prev by Date: clearing NSView outside of drawRect:
  • Next by Date: Re: Trying to compile an ObjectiveC and C++ program in XCode 3.1
  • Previous by thread: Re: clearing NSView outside of drawRect:
  • Next by thread: Re: Animate a CGPath
  • Index(es):
    • Date
    • Thread