mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -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
26
tutorial/Draw05/main.cpp
Normal file
26
tutorial/Draw05/main.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
Image image;
|
||||
|
||||
void Paint(Draw& w) {
|
||||
w.DrawRect(GetSize(), Cyan());
|
||||
w.DrawImage(10, 10, image);
|
||||
}
|
||||
|
||||
MyApp() {
|
||||
ImageDraw iw(100, 40);
|
||||
iw.Alpha().DrawRect(0, 0, 100, 40, GrayColor(0));
|
||||
iw.Alpha().DrawEllipse(0, 0, 100, 40, GrayColor(255));
|
||||
iw.DrawEllipse(0, 0, 100, 40, Yellow());
|
||||
iw.DrawText(26, 10, "Image", Arial(16).Bold());
|
||||
image = iw;
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Sizeable().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue