mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 22:03:07 -06:00
reorganizing repo
git-svn-id: svn://ultimatepp.org/upp/trunk@9206 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7d17505cfe
commit
e3e8d627f5
3840 changed files with 0 additions and 1161578 deletions
|
|
@ -1,43 +0,0 @@
|
|||
#include "Examples.h"
|
||||
|
||||
void TextCoding(Painter& sw)
|
||||
{
|
||||
sw.Text(100, 100, "Hello world! ščřůúžýáíé Běifānghuà 北方話",
|
||||
Font().FaceName("Bitstream Vera Sans Mono").Height(20))
|
||||
.Fill(LtBlue());
|
||||
}
|
||||
void TextFillSolid(Painter& sw)
|
||||
{
|
||||
sw.Text(100, 100, "Hello world!", Roman(120).Italic().Bold())
|
||||
.Fill(LtBlue());
|
||||
}
|
||||
|
||||
const char *text = "Quick Brown Fox Jumps Over The Lazy Dog!";
|
||||
|
||||
void SomeTexts(Painter& sw)
|
||||
{
|
||||
int face[] = {
|
||||
Font::ARIAL, Font::ROMAN, Font::COURIER
|
||||
};
|
||||
int height[] = {
|
||||
10, 16, 20
|
||||
};
|
||||
sw.Rectangle(600, 0, 1000, 1000).Fill(Blue());
|
||||
for(int x = 20; x < 1000; x += 600) {
|
||||
double y = 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(x, y, text, Font().Face(face[c]).Height(height[h]).Italic(italic).Bold(bold))
|
||||
.Fill(x == 20 ? Black() : White());
|
||||
y += height[h] + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INITBLOCK {
|
||||
RegisterExample("Filling text with solid color", TextFillSolid);
|
||||
RegisterExample("Various fonts", SomeTexts);
|
||||
RegisterExample("Filling text with solid color, replacements & compositions", TextCoding);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue