transformed-line-stroke.html (306B)
1 <canvas id=c></canvas> 2 <script> 3 const canvas = document.getElementById("c"); 4 const ctx = canvas.getContext("2d"); 5 6 canvas.width = 600; 7 canvas.height = 300; 8 9 ctx.translate(-5, 0); 10 11 ctx.strokeStyle = "rgba(0, 0, 0, 1)"; 12 ctx.beginPath(); 13 ctx.moveTo(93, 137.5); 14 ctx.lineTo(741, 137.5); 15 ctx.stroke(); 16 </script>