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
[SOLVED] Simple example for DrawPainter::Path [message #54685] Tue, 01 September 2020 08:03 Go to next message
Hrundel is currently offline  Hrundel
Messages: 2
Registered: September 2020
Location: DE
Junior Member
Hi everyone,
can you give me some short example Application, how to paint with Path aka.

w.Path("M50, 100 L400, 200 .... "); /// etc.

Just with Path. Nothing else.

Best regards

[Updated on: Tue, 01 September 2020 15:06]

Report message to a moderator

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

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


Current Time: Fri Mar 29 16:28:19 CET 2024

Total time taken to generate the page: 0.01957 seconds