[REPLY] Squeak Alpha Transparency methods...

Ali Chamas alichamas at yahoo.com
Mon Dec 6 04:16:55 UTC 1999


Hi Andreas,

--- "Raab, Andreas" <Andreas.Raab at disney.com> wrote: 
> Alpha blending works fine but only in > 8bit display
> depth. If you are
> running it in 8bit you get the effect that
> everything goes black. Change
> your display depth to either 16 or 32 bit and
> everything should be okay.

Yippie!! That was the simple fact which i was
overlooking, doh! and thanks. I also noted that it
works with 8 bit masked ColorForm as well! Groovy...

> The following should - in theory - work if you are
> in 32bit depth:
> 
> form _ Form fromUser asGrayScale. "results in a
> ColorForm"
> form colors: (form colors collect:[:c| c alpha: c
> red]).
> form displayOn: Display at: 0 at 0 rule: 34.
> "Form>>alphaBlend"
> 
> But right now it doesn't because of the above
> mentioned problem.

....just so that i'm sure, this above example runs
through each color, and replaces the entry with a
Translucent version of the RGB, but uses the red value
of the entry for the alpha. Does this mean that Squeak
handles a "rich" transparency mask (ala the grey scale
mask of a Mac PICT file) by the alpha value of each
color, not by using a seperate colorMap or image for
the mask? If so, is the bug you mentioned only
stopping the alphaBlend mode from working properly.

Thanks for your time Andreas,
Ali.
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com





More information about the Squeak-dev mailing list