mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
26 lines
420 B
C++
26 lines
420 B
C++
#include <CtrlLib/CtrlLib.h>
|
|
|
|
using namespace Upp;
|
|
|
|
struct App : TopWindow {
|
|
Image img;
|
|
|
|
virtual void Paint(Draw& w) {
|
|
w.DrawRect(GetSize(), SWhite);
|
|
w.DrawImage(0, 0, img);
|
|
}
|
|
|
|
App() {
|
|
ImageDraw w(100, 100);
|
|
w.DrawRect(0, 0, 100, 100, SGray);
|
|
w.DrawEllipse(0, 0, 100, 100, SGreen);
|
|
w.DrawText(0, 0, "ImageDraw!", Arial(13).Bold(), SYellow);
|
|
img = w;
|
|
Sizeable();
|
|
}
|
|
};
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
App().Run();
|
|
}
|