FROM : Scott Ellsworth
DATE : Mon Apr 25 20:38:23 2005
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
DATE : Mon Apr 25 20:38:23 2005
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
| Related mails | Author | Date |
|---|---|---|
| Brian O'Brien | Apr 25, 20:06 | |
| Thomas Davie | Apr 25, 20:11 | |
| Scott Ellsworth | Apr 25, 20:38 | |
| John C. Randolph | Apr 26, 00:26 |






Cocoa mail archive

