spinnerbox Posted July 13, 2016 Share Posted July 13, 2016 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 More sharing options...
spinnerbox Posted July 14, 2016 Author Share Posted July 14, 2016 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 More sharing options...
spinnerbox Posted July 14, 2016 Author Share Posted July 14, 2016 Wow didn't notice until now there is alpha mask: http://phaser.io/examples/v2/bitmapdata/alpha-mask Link to comment Share on other sites More sharing options...
spinnerbox Posted July 15, 2016 Author Share Posted July 15, 2016 looks good Link to comment Share on other sites More sharing options...
Recommended Posts