Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » [SOLVED] Simple example for DrawPainter::Path
|
Re: Simple example for DrawPainter::Path [message #54687 is a reply to message #54685] |
Tue, 01 September 2020 10:56  |
Hrundel
Messages: 2 Registered: September 2020 Location: DE
|
Junior Member |
|
|
OK, I solved it like this.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyAppWindow : TopWindow
{
String s = "M100,200 C100,100 400,100 400,200";
virtual void Paint(Draw& w)
{
DrawPainter sw(w, GetSize());
sw.Clear(SWhite());
sw.Path(s).Stroke(5, SBlack());
}
MyAppWindow()
{
Title("My application").Zoomable().Sizeable();
}
};
GUI_APP_MAIN
{
MyAppWindow app;
app.SetRect(0, 0, 200, 100);
app.Run();
}
Realy simple.
[Updated on: Tue, 01 September 2020 15:06] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon May 29 06:52:28 CEST 2023
Total time taken to generate the page: 0.01558 seconds
|