HTML5   18

myCanavas lineTo stroke

Guest on 25th November 2021 10:21:17 PM

  1. <!DOCTYPE html>
  2. <title>myCanavas lineTo stroke</title>
  3. </head>
  4.  
  5. <canvas id="myCanvas" width="2000" height="1000" style="border:1px solid #d3d3d3;">
  6. Your browser does not support the HTML canvas tag.</canvas>
  7.  
  8. var c = document.getElementById("myCanvas");
  9. var ctx = c.getContext("2d");
  10. ctx.moveTo(0,115);
  11. ctx.lineTo(2000,1000);
  12. ctx.stroke();
  13.  
  14. </body>
  15. </html>

Raw Paste


Login or Register to edit or fork this paste. It's free.