• 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: How to import drawing paths into a Cocoa application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to import drawing paths into a Cocoa application?


  • Subject: Re: How to import drawing paths into a Cocoa application?
  • From: Steve Weller <email@hidden>
  • Date: Sat, 26 Apr 2008 15:43:22 -0700


On Apr 21, 2008, at 5:23 PM, Steve Weller wrote:


I my app I want to be able to use drawing paths for two purposes:

1. Clip images to the path

2. Generate points that lie on the path as a function of the distance along the path

I want to be able to create paths with Omnigraffle or some other vector-image app, and export them to PDF or EPS or equivalent format. The objects I am dealing with could have multiple path segments and/or paths that intersect themselves and each other. I will probably use Quartz rather than Cocoa drawing.

I expected to see a class method for NSBezierPath that would grab a path from a file, but it is not there. So:

1. What file format should I use to store my paths?

2. How do I get the path into an object that I can use?

I can clip images to a path by using the addClip method on the NSBezierPath. Are there any easy ways of calculating the points on the path as a function of the distance from the start of the path?

Having researched #2 above and found a number of resources that say "It's not trivial", I encountered the developer example code for Voyeur. It's an app that looks inside PDFs and extracts, lists, and renders them. So there is a decent example, but it is certainly not trivial. Carbon and Quartz. I pretty much expected to be working in Quartz, but it looks like there are no nice Cocoa classes to help me.
_______________________________________________


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


References: 
 >How to import drawing paths into a Cocoa application? (From: Steve Weller <email@hidden>)

  • Prev by Date: Re: Problem with Memory Leaks
  • Next by Date: Calculating file size
  • Previous by thread: Re: How to import drawing paths into a Cocoa application?
  • Next by thread: Flicker when resizing NSStatusItem with Custom View
  • Index(es):
    • Date
    • Thread