PainterExamples improvement

git-svn-id: svn://ultimatepp.org/upp/trunk@784 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-01-18 17:58:58 +00:00
parent 6c32a8e05a
commit a2cfe745b0
5 changed files with 23 additions and 32 deletions

View file

@ -2,10 +2,27 @@
void FillGradient(Painter& sw)
{
sw.Rectangle(0, 0, 500, 500)
.Fill(200, 100, Blue(), 300, 300, LtRed());
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);
}

View file

@ -1,11 +0,0 @@
#include "Examples.h"
void FillGradientReflect(Painter& sw)
{
sw.Rectangle(0, 0, 500, 500)
.Fill(200, 100, Blue(), 300, 300, LtRed(), GRADIENT_REFLECT);
}
INITBLOCK {
RegisterExample("Linear gradient - REFLECT", FillGradientReflect);
}

View file

@ -1,13 +0,0 @@
#include "Examples.h"
#include "Examples.h"
void FillGradientRepeat(Painter& sw)
{
sw.Rectangle(0, 0, 500, 500)
.Fill(200, 100, Blue(), 300, 300, LtRed(), GRADIENT_REPEAT);
}
INITBLOCK {
RegisterExample("Linear gradient - REPEAT", FillGradientRepeat);
}

View file

@ -14,8 +14,6 @@ file
Curves.cpp,
Clipping.cpp,
Gradient.cpp,
GradientReflect.cpp,
GradientRepeat.cpp,
ColorStops.cpp,
Radial.cpp,
RadialFocus.cpp,

View file

@ -32,8 +32,8 @@ void RadialFocusRepeat(Painter& sw)
}
INITBLOCK {
RegisterExample("Radial gradient with focus", RadialFocus);
RegisterExample("Radial gradient with focus - PAD", RadialFocusPad);
RegisterExample("Radial gradient with focus - REFLECT", RadialFocusReflect);
RegisterExample("Radial gradient with focus - REPEAT", RadialFocusRepeat);
RegisterExample("Radial gradient - focus", RadialFocus);
RegisterExample("Radial gradient - focus - PAD", RadialFocusPad);
RegisterExample("Radial gradient - focus - REFLECT", RadialFocusReflect);
RegisterExample("Radial gradient - focus - REPEAT", RadialFocusRepeat);
}