On Wednesday, September 29, 2004, at 04:06 AM, Tschofen, Martin wrote:
1. I have an object class that has multiple different subclasses for
each shape. All items are drawn into a canvas for display. When I have
some 50+ objects on screen, the response time of selecting an object
is slooow. Anybody have any pointers on how to deal with an efficient
way of dealing with this?
are you sure that the selection is the problem? i use 2d objects for
imagefilter and while i like the API, i expect redraw much slower than
handwritten quickdraw draw when there are many objects.
2. How do I efficiently implement shift selecting (multiple
selections)? To make things worse, it gets even slower when I try to
deal with shift selecting. I have to work my way twice through the
items to identify which item was shift clicked and which items to
deselect.
what is the problem? if every object has a selected property, you
change that property when it is shift and add it to a selection array.
when it is not shift, you reset the property for every object in the
selection array and remove it from the array and then you add the new
one (if there is one selected).
matthias
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|