Facebook
From Bistre Madrill, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 243
  1. <!DOCTYPE html>
  2. <!--
  3. To change this license header, choose License Headers in Project Properties.
  4. To change this template file, choose Tools | Templates
  5. and open the template in the editor.
  6. -->
  7. <html>
  8.     <head>
  9.         <title>TODO supply a title</title>
  10.         <meta charset="UTF-8">
  11.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12.     </head>
  13.     <body>
  14.         <canvas id="can" width="1000" height="500" style="position: absolute;"></canvas>
  15.         <canvas id="can2" width="1000" height="500" style="position: absolute;"></canvas>
  16.         <script>
  17.            
  18.            
  19.             var canvas = document.getElementById("can");
  20.             var ctx = canvas.getContext("2d");
  21.             var canvas2 = document.getElementById("can2");
  22.             var ctx2 = canvas2.getContext("2d");
  23.            
  24.             function rysuj(){
  25.             ctx.beginPath();
  26.             ctx.moveTo(520,250);
  27.             ctx.lineTo(450,150);
  28.             ctx.lineTo(600,150);
  29.             ctx.lineTo(520,250);
  30.             ctx.lineTo(450,350);
  31.             ctx.lineTo(600,350);
  32.             ctx.lineTo(520,250);
  33.             ctx.strokeStyle="Blue";
  34.             ctx.stroke();
  35.             ctx.closePath();
  36.            
  37.             ctx.beginPath();
  38.             ctx.arc(375,285,60,0,Math.PI*2);
  39.             ctx.stroke();
  40.             ctx.closePath();
  41.            
  42.             ctx.beginPath();
  43.             ctx.arc(675,316,30,0,Math.PI*2);
  44.             ctx.stroke();
  45.             ctx.closePath();
  46.         }
  47.  
  48.         </script>
  49.         <input type="button" value="Restart" onclick="restart()" style="margin-top: 650px;">
  50.     </body>
  51. </html>