Archydemon Posted January 25, 2021 Share Posted January 25, 2021 I'm looking for a way of creating an enclosed perimeter with dashed border. It will contain only vertical and horizontal lines, but the path can be complex. For example let's just imagine I need to draw Tetris figures (no fill, just perimeter) with dashed line. As far as I can see in the documentation figure stroke and lines can only change color and alpha. Any suggestions of achieving the dashed line effect are appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
Archydemon Posted January 26, 2021 Author Share Posted January 26, 2021 UPD: I have found an extremely easy but dirty way of doing this. Classic 2d canvas has built-in function for drawing dashed lines. It will work for me as I need static lines. But I don't really like the idea of creating second canvas element just for creating a layer with dashed lines. Link to comment Share on other sites More sharing options...
Archydemon Posted February 1, 2021 Author Share Posted February 1, 2021 UPD: I decided to break figures to repeatable tiles and prepared a set of PNGs with dashed line drawn in it. So I just build figures that I need out of tiles Link to comment Share on other sites More sharing options...
Recommended Posts