On 22 Apr 2008, at 10:23 am, Steve Weller wrote:
Are there any easy ways of calculating the points on the path as a
function of the distance from the start of the path?
I'm not sure about the rest of your question but I can answer this
part. The short answer is no - it's really tricky.
However if you have a look at my DrawKit project, it solves this
problem exactly ;-)
One category method on NSBezierPath I have is:
- (NSPoint) pointOnPathAtLength:(float) length slope:(float*) slope;
where <length> is the linear distance from the start of the path - it
optionally also returns the slope (dy/dx) at the given point. The
project is still in beta though this method is used a lot in my code
and is well debugged.
http://apptree.net/drawkitmain.html
hth,
G.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]