Implementing a drawing canvas
Implementing a drawing canvas
- Subject: Implementing a drawing canvas
- From: Tommy Nordgren <email@hidden>
- Date: Fri, 16 Sep 2005 21:04:02 +0200
I wonder wether anyone knows of any examples, or useful weblinks on
implementing
an Object Based drawing canvas with Cocoa. With Object Based, I mean
drawing
with discrete objects that can be selected individually.
I need to implement a custom NSView class, that acts as a conatiner
for a set
of "light-weight" drawing classes, (NOT NSView subclasses).
For efficiency, I need to implement some kind of spacial sorting, so
that updating
my view only needs to message objects that actually intersects the
visible rectangle/region
The two obvious ways to do this, 2D trees, and gridding, is
complicated by the objects not being
points. I welcome any ideas of suitable data structures to handle this.
-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
email@hidden
_______________________________________________
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