How create a line with borders in HTML5 canvas properly
问题 I want to draw a path of lines with borders in html, to render the streets in a map, but I could not find any standard way to do that, so I resourced to draw two superposed lines, the first one thicker than the second. The first attempt actually worked well: <!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="1000" height="1000" style="border:1px solid #000000;"> Your browser does not support the HTML5 canvas tag. </canvas> <script> var c=document.getElementById("myCanvas"); var ctx=c