Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
mirek is currently offline  mirek
Messages: 13980
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
 
Read Message
Read Message
Previous Topic: DateTimeCtrl refactored...
Next Topic: A new useful topic++ started....
Goto Forum:
  


Current Time: Sun May 19 10:10:31 CEST 2024

Total time taken to generate the page: 0.00782 seconds