mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -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
37
examples/PainterExamples/Image.cpp
Normal file
37
examples/PainterExamples/Image.cpp
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue