ultimatepp/examples/PainterExamples/Gradient.cpp
cxl 0d4c8a71a5 PainterExamples improvement
git-svn-id: svn://ultimatepp.org/upp/trunk@784 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-01-18 17:58:58 +00:00

28 lines
721 B
C++

#include "Examples.h"
void FillGradient(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(200, 100, Blue(), 300, 300, LtRed())
.Stroke(2, Black());
}
void FillGradientReflect(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(200, 100, Blue(), 300, 300, LtRed(), GRADIENT_REFLECT)
.Stroke(2, Black());
}
void FillGradientRepeat(Painter& sw)
{
sw.Rectangle(10, 10, 1000, 600)
.Fill(200, 100, Blue(), 300, 300, LtRed(), GRADIENT_REPEAT)
.Stroke(2, Black());
}
INITBLOCK {
RegisterExample("Linear gradient - PAD", FillGradient);
RegisterExample("Linear gradient - REFLECT", FillGradientReflect);
RegisterExample("Linear gradient - REPEAT", FillGradientRepeat);
}