• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Removing point from NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSString doubleValue and zero
  • Next by Date: Setting the sound output volume and balance
  • Previous by thread: Re: Application Security...
  • Next by thread: Setting the sound output volume and balance
  • Index(es):
    • Date
    • Thread