[ENH] faster Genie feedback (CRStrokeMorph)

Hans-Martin Mosner hmm at heeg.de
Fri Mar 16 09:03:05 UTC 2001


Jesse Welton wrote:
> 
> It might be possible to use a Morph *and* a pen trail.  If you can
> trick the StrokeMorph into not invalidating its bounding rect, the pen
> trail can take care of fast drawing over static Morphs (no slowdown
> for expensive Morphic redraws).  On the other hand, when drawing over
> dynamic content like a BouncingAtomsMorph, the changing background
> would invalidate the region, and the StrokeMorph on top would take
> care of re-drawing the stroke.  It's more complicated, but I think it
> could get you both great speed in the normal case, and the cool
> display property you would like on top of dynamic content.
> 
> -Jesse

Your wish is my command :-)
The enclosed changeset defines a CRStrokeMorph that works basically as
you describe it. However, Genie disables Morphic stepping during gesture
capture, so the effect you desire does not happen. However, if your
machine is fast enough (not an iPaq) you might change
WorldState>>doOneCycleNowFor: so that morphs are stepped even when Genie
is recognizing. With CRStrokeMorph, it works sufficiently well over a
BouncingAtomsMorph on my 700 MHz PIII machine here at work, but I would
not do it on much slower machines.

The changeset also includes a fix to EventHandler so that associating a
gesture dictionary to a morph which normally does not handle mouse down
works now.

Have fun,
Hans-Martin





More information about the Squeak-dev mailing list