AW: [squeak-dev] The Trunk: Graphics-mt.152.mcz
Marcel Taeumel
marcel.taeumel at student.hpi.uni-potsdam.de
Tue Nov 16 14:07:24 UTC 2010
Hi.
Great idea! As I use that at the moment for text fading animations I noticed
some ugly transition. Maybe it was that subpixel rendering.
Bye,
Marcel
-----Ursprüngliche Nachricht-----
Von: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] Im Auftrag von Juan
Vuletich
Gesendet: Dienstag, 16. November 2010 14:54
An: The general-purpose Squeak developers list
Betreff: Re: AW: [squeak-dev] The Trunk: Graphics-mt.152.mcz
Hi Marcel,
Marcel Taeumel wrote:
> So "The Inbox: Graphics-mt.157.mcz" includes that missing detail now.
>
> Both code snippets just work fine then:
>
> ('Hello, World' asText addAttribute: (TextColor color: (Color blue alpha:
> 0.5))) asMorph openInHand
>
> Display getCanvas drawString: 'This is a Test' at: 20 at 20 font: TextStyle
> defaultFont color: (Color red alpha: 0.5)
>
> Bye,
> Marcel Taeumel
>
I played a little bit more with it, and I think the best solution is to
completely disable subpixel rendering for translucent text. To do this,
go back to the old version of the method, (dated on 2009) and replace this :
(Preferences subPixelRenderFonts and: [ foregroundColor = Color
black or: [ Preferences subPixelRenderColorFonts ]]) ifTrue: [
by this:
(Preferences subPixelRenderFonts and: [ foregroundColor = Color
black or: [ Preferences subPixelRenderColorFonts and: [foregroundColor
isOpaque]]]) ifTrue: [
This makes almost opaque colors (alpha > 0.9) look much better.
Cheers,
Juan Vuletich
More information about the Squeak-dev
mailing list
|