[QUESTION] Squeak Alpha Transparency methods...

Raab, Andreas Andreas.Raab at disney.com
Mon Dec 6 02:46:09 UTC 1999


Ali,

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.

Examples are in
	BitBlt class>>alphaBlendDemo
	BitBlt class>>antiAliasDemo

Your last question is a bit harder, since there seems to be a bug in the
system. [Note to Dan: why does ColorForm>>colorMapIfNeededForDepth: use
Color>>pixelValueForDepth: and why does
TranslucentColor>>pixelValueForDepth: return just the RGB part for 32bit
depths?!].

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.

  Andreas

> -----Original Message-----
> From: Ali Chamas [mailto:alichamas at yahoo.com]
> Sent: Sunday, December 05, 1999 5:37 PM
> To: squeak at cs.uiuc.edu
> Cc: recipient list not shown
> Subject: [QUESTION] Squeak Alpha Transparency methods...
> 
> 
> Hi All,
> 
> While playing around with the Form class, i tried the
> paintBits:at:translucent: method, and found the result
> to blend the image with a black tint. As the values
> for translucent: moved towards 0, then resulting blend
> became more darker (not what i was kind of hoping
> for). Does Squeak support the "cleaner" type of alpha
> blend (ala adjusting the Opaque value of a Photoshop
> layer)? IF SO, WOULD ANYBODY BE KIND ENOUGH TO LIST A
> FEW SQUEAK ALPHA BLEND EXAMPLES? Also, how can i
> create a Form which used an 8-bit greyscale soft mask,
> not a 2-bit transparent mask? Hmmmmmm....
> 
> Cheers,
> 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