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   |
Oblivion
Messages: 1204 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
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Mon, 31 January 2022 17:54] Report message to a moderator
|
|
|
 |
|
Display transparent paper
By: Silvan on Sat, 29 January 2022 20:38
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 00:09
|
 |
|
Re: Display transparent paper
By: Silvan on Sun, 30 January 2022 09:34
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 18:14
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 18:20
|
 |
|
Re: Display transparent paper
By: Silvan on Sun, 30 January 2022 19:15
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 23:17
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 23:23
|
 |
|
Re: Display transparent paper
By: Silvan on Mon, 31 January 2022 12:20
|
 |
|
Re: Display transparent paper
By: Oblivion on Mon, 31 January 2022 17:47
|
 |
|
Re: Display transparent paper
By: Silvan on Mon, 31 January 2022 18:46
|
Goto Forum:
Current Time: Tue Apr 29 16:10:54 CEST 2025
Total time taken to generate the page: 0.00964 seconds
|