Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » BackPaintHint
|
Re: BackPaintHint [message #12693 is a reply to message #12485] |
Tue, 13 November 2007 10:17 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Ops, had to remove this feature.
To my surprise, I have found that Win32 produces different results when rendering text to off-screen bitmap DC and to the screen, at least with some videocards as you can check with this code:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class Vera : public TopWindow {
public:
virtual void Paint(Draw& draw);
typedef Vera CLASSNAME;
};
void DrawIt(Draw& w)
{
w.DrawRect(0, 0, 10000, 10000, White());
w.DrawText(10, 10, "Vera::Paint", Font().FaceName("Bitstream Vera Sans Mono").Height(13));
w.DrawText(10, 30, "Arial", Arial(18));
w.DrawText(10, 50, "Roman", Roman(18));
}
void Vera::Paint(Draw& w)
{
DrawIt(w);
ImageDraw iw(200, 200);
DrawIt(iw);
w.DrawImage(100, 0, iw);
}
GUI_APP_MAIN
{
Vera().Run();
}
It it best visible with Bitstream Vera Sans Mono font, but with Arial or Roman too...
Means, we cannot mix backpainting with direct painting in a single widget as it looks weird.
Mirek
|
|
|
Goto Forum:
Current Time: Thu Apr 25 00:16:20 CEST 2024
Total time taken to generate the page: 0.02609 seconds
|