More PainterExamples improvements...

git-svn-id: svn://ultimatepp.org/upp/trunk@886 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-02-22 09:50:15 +00:00
parent 3ee457fed8
commit 2e73dc2080

View file

@ -11,19 +11,20 @@ const char *text = "Quick Brown Fox Jumps Over The Lazy Dog!";
void SomeTexts(Painter& sw)
{
double y = 20;
Font fnt[] = {
Arial(10), Arial(16), Arial(24),
Arial(10).Italic(), Arial(16).Italic(), Arial(24).Italic(),
Roman(10), Roman(16), Roman(24),
Roman(10).Italic(), Roman(16).Italic(), Roman(24).Italic(),
Courier(10), Courier(16), Courier(24),
Courier(10).Italic(), Courier(16).Italic(), Courier(24).Italic(),
int face[] = {
Font::ARIAL, Font::ROMAN, Font::COURIER
};
for(int i = 0; i < __countof(fnt); i++) {
Font f = fnt[i];
sw.Text(20, y, text, f).Fill(Black());
y += f.GetHeight();
}
int height[] = {
10, 15, 20
};
for(int h = 0; h < __countof(height); h++)
for(int italic = 0; italic < 2; italic++)
for(int bold = 0; bold < 2; bold++)
for(int c = 0; c < __countof(face); c++) {
sw.Text(20, y, text, Font().Face(face[c]).Height(height[h]).Italic(italic).Bold(bold))
.Fill(Black());
y += height[h] + 2;
}
}
INITBLOCK {