diff --git a/examples/PainterExamples/Lion.cpp b/examples/PainterExamples/Lion.cpp index 6eb95eec7..c8f85487a 100644 --- a/examples/PainterExamples/Lion.cpp +++ b/examples/PainterExamples/Lion.cpp @@ -213,7 +213,7 @@ void PaintLion(Painter& sw) for(int i = 0; i < 10; i++) { sw.Begin(); - sw.Opacity(1 - (i + 1) / 10.0); + sw.Opacity(0.5); sw.Translate(600, 200); sw.Rotate(i / 10.0 * M_2PI); sw.Rectangle(0, 0, 200, 500) diff --git a/examples/PainterExamples/StrokeBug.cpp b/examples/PainterExamples/StrokeBug.cpp index 6010d4736..84c587b22 100644 --- a/examples/PainterExamples/StrokeBug.cpp +++ b/examples/PainterExamples/StrokeBug.cpp @@ -4,11 +4,11 @@ void StrokeBug(Painter& sw) { - const char *txt = "GR";//ADIENT TEXT"; + const char *txt = "GRM";//ADIENT TEXT"; Font fnt = Arial(100).Bold(); Size tsz = GetTextSize(txt, fnt); - sw.Scale(-4, 4); - sw.Translate(-300, 0); + 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()); diff --git a/examples/PainterExamples/main.cpp b/examples/PainterExamples/main.cpp index c53ebda35..10831787c 100644 --- a/examples/PainterExamples/main.cpp +++ b/examples/PainterExamples/main.cpp @@ -26,6 +26,20 @@ struct App : TopWindow { SplitterFrame split; ArrayCtrl list; + virtual bool Key(dword key, int count) + { + if(key == K_CTRL_P) { + PaintingPainter sw(1000, 1000); + sw.Clear(White()); + if(list.IsCursor()) + Examples()[list.GetCursor()].example(sw); + PrinterJob pb; + if(pb.Execute()) + pb.GetDraw().DrawPainting(0, 0, 4000, 4000, sw); + } + return TopWindow::Key(key, count); + } + virtual void Paint(Draw& w) { ImageBuffer ib(GetSize());