From a243c6106537ec9be899df007c1869933ca08f73 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 20 Dec 2018 12:55:12 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@12629 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/DrawArc/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/upptst/DrawArc/main.cpp b/upptst/DrawArc/main.cpp index 957a4984f..5bda896fb 100644 --- a/upptst/DrawArc/main.cpp +++ b/upptst/DrawArc/main.cpp @@ -1,4 +1,5 @@ #include +#include 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();