translucent and transparent in B3d

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Mon Aug 11 18:25:53 UTC 2003


Martin Kuball wrote:

> Hi!
> 
> In B3DSceneMorph>>renderOn: the color of the morph is checked for 
> translucency:
> 
> 	(color isTransparent or: [color isTranslucent]) 
> 		ifTrue: [myRenderer restoreMorphicBackground: self bounds under: self].
> 
> If I understand this, translucency includes transparency. So the explicit 
> test for the latter is not necessary, isn't it?
> 
> Som lines later:
> 
> 	color isTransparent 
> 		ifFalse:[myRenderer clearViewport: color].
> 
> Should't this be "color isTranslucent" here?

No. If the color is not transparent, the viewport must be filled with 
the translucent color to get the "tint" effect.

-- Bert



More information about the Squeak-dev mailing list