• 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: Scott Ellsworth <email@hidden>
  • Date: Mon, 25 Apr 2005 11:38:23 -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.
b) hold the list of polygons.

My current app draws a hexmap. It stores a collection of Hex instaces, each of which knows its own hex number. In drawRect, I convert the number to a center location and six corner points. It reverses the calculation to determine which hex numbers are within the visRect.


The Hex class instances are stored in Core Data, but they were previously stored in an NSDictionary, with a computed NSArray of the ones that are on screen. I suspect I could write a subclass of NSArrayController that talked directly to the bindings running things.

Scott
_______________________________________________
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: Converting CGImageRefs to NSImages, how?
  • Next by Date: Re: NSFileModificationDate after 2039
  • Previous by thread: Re: Drawing polygons and keeping a list of them...
  • Next by thread: Re: Drawing polygons and keeping a list of them...
  • Index(es):
    • Date
    • Thread