Re: Drawing polygons and keeping a list of them...
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