On Apr 28, 2005, at 4:01 PM, Linea Tessile srl wrote:
Does anybody know how calculate the intersection point between two
lines created using an NSBezierPath?
Since NSBezierPath's contain curves, there is no "the intersection
point". Even if both are just a single curve (and an NSBezierPath is
more like a complex polygon since it can contain multiple "line to"s
and "curve to"s, not to mention multiple discontinuous shapes - an
entire page of text outlines could be a single NSBezierPath), there
still isn't a single interesection point (I can think of a case that
gives six points of intersection).
You're best bet is to use bezierPathByFlatteningPath to get a bezier
path composed only of straight lines and then do standard line
intersection tests between each segment of each of the bezier paths
(and yes, this can get real expensive real quick).
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden