git-svn-id: svn://ultimatepp.org/upp/trunk@12188 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-08-26 12:23:36 +00:00
parent c17038f51c
commit 28362b60bb

View file

@ -8,6 +8,9 @@ struct MyApp : TopWindow {
void MyApp::Paint(Draw& w)
{
Font monaco;
monaco.Height(20).FaceName("Monaco");
Size sz = GetSize();
w.DrawRect(sz, White());
@ -16,11 +19,13 @@ void MyApp::Paint(Draw& w)
int x = 0;
int y = 0;
Font fnt = StdFont();
fnt = monaco().Italic();
while(angle < 360) {
w.DrawText(x, y, AsString(angle));
w.DrawRect(x + 49, y + 49, 3, 3, LtRed());
w.DrawText(x + 50, y + 50, angle * 10, AsString(angle));
w.DrawText(x + 50, y + 50, angle * 10, AsString(angle), fnt);
angle += 10;
x += 100;
@ -30,6 +35,19 @@ void MyApp::Paint(Draw& w)
y += 100;
}
}
for(int i = 0; i < 4; i++) {
w.DrawText(0, y, "Hello World", monaco);
w.DrawText(200, y, "Hello World", monaco().Bold());
w.DrawText(400, y, "Hello World", monaco().Italic());
w.DrawText(600, y, "Hello World", monaco().Bold().Italic());
w.DrawText(800, y, "Hello World", monaco().Underline());
if(i == 1)
monaco = Arial(20);
if(i == 2)
monaco = Roman(20);
y += 30;
}
}
GUI_APP_MAIN