Jump to content

Creating an unclosed polyline


Beta_Ravener
 Share

Recommended Posts

I've been trying to create, so far unsuccessfuly, a polyline using Graphics class. I simply set the line style, use moveTo to define start and 2 lineTo commands to create 2 successive lines. However, the shape gets closed automatically and I can't find any switch to prevent this behaviour. I've been looking at the examples but none of them creates polylines like I want. I have also been looking at the sources behind Graphics and well enough, moveTo always creates a Polygon object, guess that's why it's getting closed.

 

The only solution I have found so far is to make simple separated lines by moveTo and single lineTo, then again moveTo and lineTo.. This however does not create line joints like for polygon and as the result there is a gap between the two lines.

 

I'm asking if it is possible to create smooth, line capped polyline or this is just not implemented? (In which case, how long would it take to? It really doesn't seem that hard. I'm asking because I need this ASAP).

 

Anyway, thank you for a great 2D library, it already saved a ton of work,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...