mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
changed svn layout
git-svn-id: svn://ultimatepp.org/upp/trunk@281 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
commit
263ff5f895
2665 changed files with 642923 additions and 0 deletions
9
tutorial/Draw02/Draw02.upp
Normal file
9
tutorial/Draw02/Draw02.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
|
||||
"main.cpp";
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
30
tutorial/Draw02/main.cpp
Normal file
30
tutorial/Draw02/main.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
void DoPainting(Draw& w) {
|
||||
w.DrawEllipse(0, 0, 100, 30, WhiteGray(), 1, Cyan);
|
||||
w.DrawText(0, 0, "Hello world", Roman(30).Bold());
|
||||
}
|
||||
virtual void Paint(Draw& w) {
|
||||
w.DrawRect(GetSize(), White());
|
||||
DoPainting(w);
|
||||
w.Offset(30, 50);
|
||||
DoPainting(w);
|
||||
w.End();
|
||||
w.Offset(20, 100);
|
||||
w.Clip(5, 5, 40, 20);
|
||||
DoPainting(w);
|
||||
w.End();
|
||||
w.End();
|
||||
w.Clipoff(10, 150, 60, 20);
|
||||
DoPainting(w);
|
||||
w.End();
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Sizeable().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue