Created
June 10, 2014 20:07
-
-
Save verma/eff7290ee67eedf864b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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