Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- Subject: Re: [firstPath appendBezierPath: [secondPath bezierPathByReversingPath]];
- From: Robert Clair <email@hidden>
- Date: Fri, 21 May 2004 08:30:56 -0400
I have found that if I try lineToPoint: on an NSBezierPath without
having first called moveToPoint: I get a runtime error. How do I
obtain these open polylines?
A line segment has two points, one for each end, a curve segment (like
all good cubic
Beziers) requires four: two end control points and two interior
control points.
NSBezierPath (and PostScript) work on the concept of adding segments to
a path. For both
types of segment the first point is implicitly the "current point",
most often the end point of the previous
segment. But you have to start the process somewhere, that is what
moveTo is for. If you
try and add a segment without establishing a current point with a
moveTo, the beginning point of the
the segment is undefined and you will get, as you note, an error.
An open polyline of N segments has N+1 points and the path is created by
moveTo: point0, lineTo: point1, lineTo: point2, ..., lineTo: pointN
I'm sorry, but I am not grasping the cause of your allergy to moveTo.
......Bob
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.