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