On 27.09.2011, at 22:14, Jonathan Mullins wrote:

Hi all,

I'm trying to fill areas on a Form object with different TranslucentColors using Form fill:fillColor:, however the areas always get filled with solid colours, ignoring the alpha values altogether. I've tried the different fill modes with no success. The form is initialised with a 32 bit depth. Any ideas?

I'm using Squeak 2.8 (I think… it's the MIT Scratch image).

This should work:

Display fill: (0@0 corner: 200@200) rule: Form blend fillColor: (Color red alpha: 0.5) 

(assuming your Display is 32 bits). See BitBlt class>>alphaBlendDemo for other display depths.

Additionally, there is rule 34 for blending with pre-multiplied alpha, if you want to get serious.

- Bert -