[BUG] Bounds of rotated Morphs are incorrect inside GeeMailMorphs

Randal L. Schwartz merlyn at stonehenge.com
Wed Mar 7 15:40:27 UTC 2001


>>>>> "Henrik" == Henrik Gedenryd <Henrik.Gedenryd at lucs.lu.se> writes:

Henrik> Randal L. Schwartz wrote:
Bert> The real problem IMHO is the use of absolute coordinates in
Bert> Morphic.
>> 
>> I suspect there'd be at least a tiny slowdown as each morph has to ask
>> all its owner morphs about its current x/y, but doesn't it sorta have
>> to do that anyway if there are rotate/transform morphs in the middle?

Henrik> Some things would be slower, others faster. E.g. finding the
Henrik> target of a click would require traversing the whole owner
Henrik> chain to compute the global position of a morph. But doing a
Henrik> fullMove or position, etc. would be faster since this would no
Henrik> longer require you to traverse all submorphs. In all, I think
Henrik> it would yield an overall slightly faster system.

Of course, if the click target event is a frequent operation and
determined to be a detriment, a cache of the current hand-mapped
bounds could be kept, with notifies coming down the chain whenever
the item is moved.  In fact, it'd probably have been computed on
the previous redraw anyway, so the drawing mechanism could keep the
cache up to date.

So you'd have bounds, bounds: and worldBounds (unsettable - simply a cache
from the last draw).

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!





More information about the Squeak-dev mailing list