mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
New PainterExamples
git-svn-id: svn://ultimatepp.org/upp/trunk@782 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
60c1b1dd3f
commit
a61c4c4e80
6 changed files with 107 additions and 9 deletions
|
|
@ -202,8 +202,26 @@ void PaintLion(Painter& sw)
|
|||
}
|
||||
}
|
||||
sw.Fill(color);
|
||||
|
||||
String txt = "U++ Painter";
|
||||
Font fnt = Roman(180).Bold();
|
||||
Size tsz = GetTextSize(txt, fnt);
|
||||
sw.Text(0.5, 400.5, txt, fnt)
|
||||
.Fill(TestImg::test(), 0, 400, 500, 400, FILL_REFLECT)
|
||||
.Stroke(5, 0, 500, Blue(), tsz.cx, 500, LtRed())
|
||||
.Stroke(1, White());
|
||||
|
||||
for(int i = 0; i < 10; i++) {
|
||||
sw.Begin();
|
||||
sw.Opacity(1 - (i + 1) / 10.0);
|
||||
sw.Translate(600, 200);
|
||||
sw.Rotate(i / 10.0 * M_2PI);
|
||||
sw.Rectangle(0, 0, 200, 500)
|
||||
.Fill(TestImg::test(), 0, 0, 200, 0);
|
||||
sw.End();
|
||||
}
|
||||
}
|
||||
|
||||
INITBLOCK {
|
||||
RegisterExample("Lion", PaintLion);
|
||||
RegisterExample("U++ Painter", PaintLion);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue