New PainterExamples

git-svn-id: svn://ultimatepp.org/upp/trunk@782 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-01-18 12:18:29 +00:00
parent f5eca158c8
commit de6e228a76
6 changed files with 107 additions and 9 deletions

View file

@ -0,0 +1,37 @@
#include "Examples.h"
void ImageExact(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(TestImg::test(), 100, 100, 500, 100)
.Stroke(2, Black());
}
void ImageReflect(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(TestImg::test(), 100, 100, 500, 100, FILL_REFLECT)
.Stroke(2, Black());
}
void ImagePad(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(TestImg::test(), 100, 100, 500, 100, FILL_PAD)
.Stroke(2, Black());
}
void ImageRepeat(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(TestImg::test(), 100, 100, 500, 100, FILL_REPEAT)
.Stroke(2, Black());
}
INITBLOCK {
RegisterExample("Image fill exact", ImageExact);
RegisterExample("Image fill reflect", ImageReflect);
RegisterExample("Image fill pad", ImagePad);
RegisterExample("Image fill repeat", ImageRepeat);
}