drawing with translucent ink?

Andreas Raab Andreas.Raab at gmx.de
Tue Mar 12 22:08:20 UTC 2002


Craig,

Look at FormCanvas>>setFillColor: and setPaintColor: to see the magic
for representing transparency with 8 <= x <= 32 bpp. Might be easiest to
just route the drawing operations through canvas instead.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Craig Latta
> Sent: Tuesday, March 12, 2002 10:57 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: drawing with translucent ink?
> 
> 
> 
> Hi--
> 
> 	Okay, here's another one. :)
> 
> 	Is it possible to draw on the Display with a Pen that 
> has a translucent
> color? I tried the snippet below and got an opaque line. Is there some
> more sophisticated way to achieve the same effect (e.g., 
> using morphs)?
> 
> 
> 	thanks again,
> 
> -C
> 
> ***
> 
> | pen |
> 
> pen _ Pen new.
> 
> pen
> 	color: (Color red alpha: 0.3);
> 	roundNib: 10;
> 	down;
> 	goto: 100 at 100
> 
> ***
> 
> --
> Craig Latta
> composer and computer scientist
> craig.latta at netjam.org
> www.netjam.org
> crl at watson.ibm.com
> To quote is human, to paraphrase divine.
> 
> 





More information about the Squeak-dev mailing list