Advertisement
metalx1000

Line Joints

Jun 29th, 2013
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.73 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.  
  8.         <script>
  9.                 var canvas = document.getElementById('MyCanvas');
  10.                 var context = canvas.getContext('2d');
  11.  
  12.                 context.beginPath();
  13.                 context.lineWidth = 15;
  14.                 context.moveTo(100,125);
  15.                 context.lineTo(150, 75);
  16.                 context.lineTo(200, 125);
  17.                 context.lineTo(150, 225);
  18.                 context.closePath();
  19.                 context.fillStyle = 'blue';
  20.                 context.fill();
  21.                 context.lineJoin='round';
  22.                 context.stroke();
  23.         </script>
  24.   </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement