• 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
Re: Drawing polygons and keeping a list of them...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing polygons and keeping a list of them...


  • Subject: Re: Drawing polygons and keeping a list of them...
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 25 Apr 2005 15:26:49 -0700


On Apr 25, 2005, at 11:06 AM, Brian O'Brien wrote:

I am writing an application that will need to draw polygons on top of images.
There may be multiple polygons on an image.


What container do you recommend I use to:

a) hold the points of each polygon.

See NSBezierPath.

b) hold the list of polygons.

See NSArray/NSMutableArray.

Another question I have is more of a GUI nature than a programatic one...

Every time a user clicks on the image a new point is added to the current polygon.
How then should I 'close' the polygon? Should the user press the escape key or
right mouse button? I need to know somehow that the user is finished drawing this
polygon and is going on to draw the next polygon.

The most common approach I've seen is to terminate using a double-click.

-jcr


John C. Randolph <email@hidden> (408) 974-8819 Sr. Cocoa Software Engineer, Apple Worldwide Developer Relations http://developer.apple.com/cocoa/index.html



_______________________________________________
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


References: 
 >Drawing polygons and keeping a list of them... (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: Beveled outline around a view(BevelBox): How to?
  • Next by Date: Re: subversion support in XCode?
  • Previous by thread: Re: Drawing polygons and keeping a list of them...
  • Next by thread: Drawing on a QuickTime movie
  • Index(es):
    • Date
    • Thread