How to make a 2D border with the same thickness around the entire perimeter

Here is an option with a rectangular border, and an attempt of antialiasing :sweat_smile:
Example: https://jsfiddle.net/prisoner849/bfLt4a0p/
Picture:

2 Likes