Views on Map
Ned Konz
ned at squeakland.org
Wed Feb 2 16:20:07 UTC 2005
On Tuesday 01 February 2005 9:07 pm, Blake wrote:
> > Beyond this you may have to remove invisible morphs from the World
> > (perhaps adding them as children of a separate, hidden morph) and put
> > them back later when they become available. Or you could move them just
> > offscreen and save their actual position in a property. When you pan the
> > world you just adjust the offsets and saved positions.
>
> Isn't it simpler to give them their actual positions and just pan the
> window? I guess if the whole graphic image is stored in memory, it's a
> different kind of inefficient.
You can do that too (by adding a translation when you render the World). But
you still have to deal with the 32K limits on the arguments to the primitives
somewhere. Perhaps this won't be a problem.
Anyhow, it's easy to try. Just subclass PasteUpMorph or change its
drawSubmorphsOn: method to do a translation.
You can then do something like
World become: (World as: MyNewPasteUpMorph)
to try the new behavior (assuming that you subclassed).
You can now have Project subclasses; these can provide different kinds of
Worlds.
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|