Skip to content

Instantly share code, notes, and snippets.

@verma
Created June 10, 2014 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verma/eff7290ee67eedf864b1 to your computer and use it in GitHub Desktop.
Save verma/eff7290ee67eedf864b1 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.lineWidth = 5;
context.beginPath();
context.moveTo(0, 0);
context.lineTo(100, 100);
context.lineTo(200, 100);
context.lineTo(200, 200);
context.stroke();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment