[wxPython-users] LCD vs CRT Monitors Issues (!)
Andrea Gavana
andrea.gavana at gmail.com
Wed Oct 31 14:51:05 PDT 2007
Hi All,
On 10/1/07, Robin Dunn wrote:
> Chris Mellon wrote:
>
> >
> > This looks like what happens when you re-draw anti-aliased text over
> > itself without erasing first. You probably have cleartype (which
> > anti-aliases text) turned on on your LCD, and not on your CRT (where
> > it tends to look terrible), which is why the bug correlates with your
> > monitor type.
>
> That's my guess too. In a nutshell what is happening is that when the
> text is redrawn the anti-aliased portion of the new text is being
> blended with the background pixels that are already there, (the
> anti-aliased pixels from the previous draw) and are ending up darker
> than if they had been blended with the real background pixels. The more
> you draw the text, the darker the blended pixels will become until they
> are full black and make the text look distorted and blocky.
>
>
> >
> > Try using a solid background mode when you draw your text instead of a
> > transparent brush.
>
> Or simply ensure that the text is only drawn once each time the
> background behind it is drawn.
Thanks to Tim Morton, who was able to track down this CRT vs LCD
monitors, now FlatMenu should work correctly on both monitor types.
Curiously, just replacing this line:
fnt = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
with this line:
fnt = wx.SystemSettings_GetFont(wx.SYS_ANSI_VAR_FONT)
Fixed the issue. I have no idea why, but it works. I can't test it on
Linux, but I don't see why it shouldn't work there too...
Also, I have finally patched ToasterBox with the modifications sent by
Luca Politti. Sorry for the long absence, the worst period at work
should be over :-D
As usual, you can find the updated sources here:
http://xoomer.alice.it/infinity77/main/freeware.html
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
More information about the wxpython-users
mailing list