TranslucentColor under Morphic in 1.31

Michael Stevens mjstevens at mindspring.com
Wed Apr 29 13:09:23 UTC 1998


Greetings all,

After messing around with Squeak at home since 1.1x, I finally
have an opportunity to use it at work, to prototype UI ideas for
clinical research software.  Morphic is a good vehicle for this 
purpose, and I can't wait to see the improvements in 2.0!  As 
soon as I get a web page established, I'll put up the (non-trade 
secret) Morphs I have put together (not that they're a big deal):

EntryBlankMorph -- I needed something fancier than UpdatingStringMorph.
In particular, I needed a visible and movable insertion point.  This
exercise wound up showing me the difference between the easy way and
the hard way of handling Morphic events.  (For the curious, the hard
way is when you ignore most of the built-in facilities. :)

SweepableRectangleMorph -- Load a Hand with a new instance, click once
to pin one corner, and click again to pin the opposite corner.  The
HandleMorph class made this a snap.

Now, on to the subject:  Should I expect TranslucentColors to work 
in Morphic yet?  Overlapping two RectangleMorphs whose fillColors 
are TranslucentColors doesn't produce the result I expected, even 
at a display depth of 32 (per the comment for TranslucentColor>>
pixelWordForDepth:).  The Morph in front wins, period.  I looked 
at BitBlt class>>alphaBlendDemo, but didn't glean anything I could 
take to Morphic.  Handing a 32-bit-deep FormCanvas to a WorldMorph 
via #canvas: isn't the right approach; the WorldMorph seems to 
discard it at the earliest opportunity.

Any and all suggestions cheerfully accepted, including "Just wait
a few weeks and your prayers will be answered." :)

Happy Squeaking,
--Michael Stevens





More information about the Squeak-dev mailing list