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
BackPaintHint [message #12485] Mon, 05 November 2007 14:57 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
This is a special hint that says U++ that single next repaint of window which the widget belongs to should be done in backpaint mode to avoid flickering.

It is now used when splitter moves or window is resized.

(Also, most likely, it will be avoided in low-end machine - as soon as I will find heurestics that actually is able to tell me which machine is low-end...)

Mirek
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: 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
Previous Topic: DateTimeCtrl refactored...
Next Topic: A new useful topic++ started....
Goto Forum:
  


Current Time: Thu Apr 25 00:16:20 CEST 2024

Total time taken to generate the page: 0.02609 seconds