Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
Hrundel is currently offline  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

 
Read Message
Read Message
Previous Topic: What is the U++ way to replace a missing font glyph?
Next Topic: Compile warnings in plugin/ppm
Goto Forum:
  


Current Time: Thu Jun 26 16:30:21 CEST 2025

Total time taken to generate the page: 0.04510 seconds