Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to import drawing paths into a Cocoa application?




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?


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.