Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Momo!</title>
  5. </head>
  6. <body>
  7.  
  8. <canvas id="canvas" width="780" height="390"></canvas>
  9.  
  10.  
  11.  
  12. <script type="text/javascript">
  13.  
  14. var canvas = document.getElementById('canvas');
  15. var ctx = canvas.getContext('2d');
  16.  
  17. function draw() {
  18. //the grid
  19. for (var i = 0; i*30 <= canvas.width; i++){
  20. ctx.beingPath;
  21. ctx.moveTo(30*i, 0);
  22. ctx.lineTo(30*i, canvas.height);
  23. ctx.strokeStyle = "red";
  24. ctx.stroke();
  25.  
  26. }
  27.  
  28. for (var i = 0; i*30 <= canvas.height; i++){
  29. ctx.beginPath;
  30. ctx.moveTo(0, 30*i);
  31. ctx.lineTo(canvas.width, 30*i);
  32. ctx.strokeStyle = "red";
  33. ctx.stroke();
  34.  
  35.  
  36. }
  37.  
  38. //the word Momo
  39. ctx.beingPath;
  40. ctx.moveTo(50,100);
  41. ctx.lineTo(50,50);
  42. ctx.lineTo(60,50);
  43. ctx.moveTo(50,100);
  44. ctx.lineTo(60,100);
  45. ctx.strokeStyle = "#000000"
  46. ctx.stroke();
  47.  
  48. }
  49.  
  50. draw();
  51.  
  52. </script>
  53. </body>
  54.  
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement