Advertisement
metalx1000

Paths Basic

Jun 28th, 2013
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.59 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3.   <head>
  4.   </head>
  5.   <body>
  6.     <canvas id="myCanvas" width="600" height="300"></canvas>
  7.     <script>
  8.       var canvas = document.getElementById('myCanvas');
  9.       var context = canvas.getContext('2d');
  10.  
  11.         context.beginPath();
  12.         context.moveTo(100,50);
  13.        
  14.         context.lineTo(200,100);
  15.         context.lineTo(300,100);
  16.         context.lineTo(350,120);
  17.         context.quadraticCurveTo(150,10,100,350);
  18.         context.strokeStyle = "blue";  
  19.         context.lineWidth=15;
  20.         context.stroke();
  21.        
  22.     </script>
  23.   </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement