Removing point from NSBezierPath
Removing point from NSBezierPath
- Subject: Removing point from NSBezierPath
- From: June Van Dyke <email@hidden>
- Date: Tue, 18 Feb 2003 18:54:44 -0500
Hello-
I need to remove a point from an NSBezierPath (the last one) in order to do
an undo. I've looked into NSUndoManager, but there seems to be no way to do
it that way. I've currently kludged this code, but it only works once (it
just moves the last point over the next-to-last one).
int currentIndex = ([mainPath elementCount] - 1);
NSPoint points;
[mainPath elementAtIndex:(currentIndex - 1) associatedPoints:&points];
[mainPath setAssociatedPoints:&points atIndex:currentIndex];
Thanks,
sinclair44
--
-- sinclair44
[self becomeWorldDictator];
- (void)becomeWorldDictator
{
[[world currentLeaders] assassinate];
[[world citizens] terrorize];
[world setCurrentLeaders:[NSArray arrayWithObject:self]];
}
_______________________________________________
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.