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 » Community » Newbie corner » Display transparent paper
Re: Display transparent paper [message #58058 is a reply to message #58057] Mon, 31 January 2022 17:47 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Hello Silvan,

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyApp : TopWindow {
	MyApp()
	{
		Sizeable().Zoomable().CenterScreen().SetRect(0, 0, 640, 480);
	}
	
	void Paint(Draw& w) override
	{
		Size sz = GetSize();
		w.DrawRect(sz, Red());
		StdCenterDisplay().Paint(w, sz, "Centered", White, Null, 0L);  // <-- There are ready-made displays which you can use in-place (they are functional globals)
	}

};

GUI_APP_MAIN
{
	MyApp().Run();
}



You can also create your own Display objects. See uppsrc/Draw/Display.cpp for details.


Best regards,
Oblivion


[Updated on: Mon, 31 January 2022 17:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Generic questions about graphic
Next Topic: Synchronize to Github
Goto Forum:
  


Current Time: Sat May 18 01:25:17 CEST 2024

Total time taken to generate the page: 0.03679 seconds