git-svn-id: svn://ultimatepp.org/upp/trunk@12629 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-12-20 12:55:12 +00:00
parent 25d52c300a
commit a243c61065

View file

@ -1,4 +1,5 @@
#include <CtrlLib/CtrlLib.h>
#include <Painter/Painter.h>
using namespace Upp;
@ -6,9 +7,8 @@ struct MyApp : TopWindow {
virtual void Paint(Draw& w);
};
void MyApp::Paint(Draw& w)
void Test(Draw& w)
{
w.DrawRect(GetSize(), White());
Pointf center(350, 300);
for(int i = 0; i < 13; i++) {
double angle = (i - 3) * M_PI / 6;
@ -29,6 +29,16 @@ void MyApp::Paint(Draw& w)
}
}
void MyApp::Paint(Draw& w)
{
w.DrawRect(GetSize(), White());
Test(w);
ImagePainter iw(700, 600);
iw.Clear(White());
Test(iw);
w.DrawImage(700, 0, iw);
}
GUI_APP_MAIN
{
MyApp().Run();