ultimatepp/examples/PainterExamples/StrokeBug.cpp
cxl 56ec9bbf8b PainterExamples: RichText
git-svn-id: svn://ultimatepp.org/upp/trunk@791 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-01-21 11:50:13 +00:00

21 lines
548 B
C++

#include "Examples.h"
void StrokeBug(Painter& sw)
{
const char *txt = "GRM";//ADIENT TEXT";
Font fnt = Arial(100).Bold();
Size tsz = GetTextSize(txt, fnt);
sw.Scale(3, 3);
// sw.Translate(-300, 0);
sw.Text(100, 100, txt, fnt)
.Stroke(10, 100, 100, Blue(), 100 + tsz.cx, 100, LtRed())
.Stroke(0.25, White());
sw.Opacity(0.7);
sw.Path("M 100 100 L 200 100 L 210 90 L 220 40 L 230 90 L 240 100 L 400 100")
.EvenOdd(true)
.Stroke(24, Blue());
}
INITBLOCK {
RegisterExample("Stroke bug (fixed)", StrokeBug);
}