Jump to content

Draw closed polygon with border


spinnerbox
 Share

Recommended Posts

ClosedPolygon.png

1. How can I draw closed polygon like the image above but without the diagonal black line that creates/finishes the polygon?

2. Or should I use Phaser.Polygon function at all? Is there some better solution?

3. Is it possible to create rectangle with mask smaller than the rectangle creating the image above? How would I apply border to this solution?

Link to comment
Share on other sites

I didn't quite find a tool that can make closed polygon from the above one. I guess that is advanced graphics stuff as I see it only in vector graphics software like Corel Draw or InkScape. Was it merge or join, sort of.

In Corel Draw you can take one rectangle and place it above another with a x/y shifted a bit and press button join or intersect and you get either intersection or both rectangles merged as one :)

The good thing is bottom and top parts need to be shown/hidden so I will fake it by placing rectangles without border and will use lineTo() function to draw line where needed. Once I have solution I will post image.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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