Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. var canvas = document.getElementById("canvas");
  2. var ctx = canvas.getContext("2d");
  3.  
  4. ctx.beginPath();
  5. ctx.moveTo(300,300);
  6. ctx.lineTo(400,300);
  7. ctx.lineTo(400,200);
  8. ctx.lineTo(300,200);
  9. ctx.lineTo(300,300);
  10. ctx.stroke();
  11.  
  12. ctx.beginPath();
  13. ctx.moveTo(330,270);
  14. ctx.lineTo(430,270);
  15. ctx.lineTo(430,170);
  16. ctx.lineTo(330,170);
  17. ctx.lineTo(330,270);
  18. ctx.stroke();
  19.  
  20. ctx.beginPath();
  21. ctx.moveTo(330,270);
  22. ctx.lineTo(300,300);
  23. ctx.stroke();
  24.  
  25. ctx.beginPath();
  26. ctx.moveTo(430,170);
  27. ctx.lineTo(400,200);
  28. ctx.stroke();
  29.  
  30. ctx.beginPath();
  31. ctx.moveTo(330,170);
  32. ctx.lineTo(300,200);
  33. ctx.stroke();
  34.  
  35. ctx.beginPath();
  36. ctx.moveTo(430,270);
  37. ctx.lineTo(400,300);
  38. ctx.stroke();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement