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
Michael Stevens mjstevens@mindspring.com wrote...
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." :)
You're right that it doesn't work. And your prayers (well, at least this one) may not get answered in the next week. But...
Since you seem to be having fun with morphic, it should be simple to fix. Here's the deal: only one of BitBlt's modes (Form blend = 24) supports translucency [this is one thing to be gleaned from the alphaBlendDemo].
Your assignment, should you choose to accept it, is to make FormCanvas use this mode whenever it is about to paint a translucent color. A way to achieve this without a lot of testing overhead would be to ask the color what mode to use, as in: <color>paintModeForCanvas, of which you may need a few variants.
If you achieve early success, send it on to us. If we get it done first, we'll let you know.
- Dan
squeak-dev@lists.squeakfoundation.org