Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

NSBezierPath : Interactive curve editing by moving a point ?

crashmonkeycrashmonkey Posts: 216Registered Users @ @
I need to draw various lines in a view, and be able to click on an endpoint of a line and interactively move it as is done in an illustration program.
I'm assuming NSBezierPath is the thing to use, but not sure how to move the points.
1. how to click and hold the point
2. how to continually redraw the path as the mouse moves the point across the view.

I did see this method setAssociatedPoints:atIndex:
which appears to move the path point at the given index to a given new point .
I imagine it will require forcing the view to redraw itself numerous times as the point is moved.
Would this require calling that method for every mouse position and redrawing the view until the mouse clicks down again?
Learning IOS development one crash at a time. <img src="http://www.iphonedevsdk.com/forum/images/smilies/confused.gif"; border="0" alt="" title="Confused" class="inlineimg" />

Replies

Sign In or Register to comment.