mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@12188 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c17038f51c
commit
28362b60bb
1 changed files with 19 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue