Advertisement
MusicFreak

Popravljanje ocjene

Oct 28th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.57 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <canvas id="myCanvas" width="1000" height="1000">
  6. </canvas>
  7.  
  8. <script>
  9.  
  10. var c=document.getElementById("myCanvas");
  11. var ctx=c.getContext("2d");
  12. ctx.fillStyle="#FFDD40";
  13. ctx.fillRect(200,300,400,200);
  14.  
  15. </script>
  16. <canvas id="myCanvas" width="200" height="100">
  17. </canvas>
  18.  
  19. <script>
  20.  
  21. var c=document.getElementById("myCanvas");
  22. var ctx=c.getContext("2d");
  23. ctx.fillStyle="#FF0000";
  24. ctx.fillRect(370,425,50,75);
  25.  
  26. </script>
  27.  
  28. <canvas id="myCanvas" width="200" height="100" >
  29. </canvas>
  30.  
  31. <script>
  32.  
  33. var c=document.getElementById("myCanvas");
  34. var ctx=c.getContext("2d");
  35. ctx.beginPath();
  36. ctx.arc(280,380,30,3.15,2*Math.PI);
  37. ctx.fillStyle="blue";
  38. ctx.fill();
  39.  
  40.  
  41. </script>
  42.  
  43. <canvas id="myCanvas" width="200" height="100" >
  44. </canvas>
  45.  
  46. <script>
  47.  
  48. var c=document.getElementById("myCanvas");
  49. var ctx=c.getContext("2d");
  50. ctx.beginPath();
  51. ctx.arc(520,380,30,3.15,2*Math.PI);
  52. ctx.fillStyle="blue";
  53. ctx.fill();
  54.  
  55.  
  56. </script>
  57.  
  58.  
  59. <canvas id="myCanvas" width="700" height="700"></canvas>
  60. <script>
  61.  
  62. var c=document.getElementById("myCanvas");
  63. var context=c.getContext("2d");
  64. context.fillStyle   = "green";
  65.  
  66. context.beginPath();
  67. context.moveTo(150, 200);
  68. context.lineTo(130, 300);
  69. context.lineTo(675, 300);
  70. context.lineTo(650, 200);
  71.  
  72. context.fill();
  73. context.closePath();
  74. </script>
  75.  
  76. <canvas id="myCanvas" width="200" height="100">
  77. </canvas>
  78.  
  79. <script>
  80.  
  81. var c=document.getElementById("myCanvas");
  82. var ctx=c.getContext("2d");
  83. ctx.fillStyle="#FF0000";
  84. ctx.fillRect(500,170,30,50);
  85.  
  86. </script>
  87.  
  88. </body>
  89. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement