Displaying text with translucent color

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Displaying text with translucent color

marcel.taeumel (old)
Hi.

I found and (maybe) fixed a bug with font rendering in the latest Squeak 4.2
Alpha (#10224) trunk version.

It is not possible to render a font with a translucent color no matter if it
is a bitmap font or not.

BitBlt does an optimization when installing a StrikeFont:


installStrikeFont: aStrikeFont foregroundColor: foregroundColor
backgroundColor: backgroundColor
[...]
self combinationRule: 37. "RBGMul"
[...]


This trick prevents translucent colors from being used in glyphs. It would
work in the following way:

foregroundColor isTranslucent
   ifFalse: [self combinationRule: Form rgbMul].



Best regards,
Marcel Taeumel



BitBlt-installStrikeFontforegroundColorbackgroundColor.st (2K) Download Attachment