Created
December 20, 2011 00:35
-
-
Save dennisschaaf/1499612 to your computer and use it in GitHub Desktop.
Simple Canvas Example
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> | |
<script type="text/javascript" src="http://static.dennisschaaf.com/hand-canvas-pre-release.js"></script> | |
<script type="text/javascript"> | |
function drawCanvas(){ | |
var canvas = document.getElementById('tutorial'); | |
if(canvas.getContext) { | |
// Get the context and convert it to a hand canvas | |
var ctx = handCanvas(canvas.getContext('2d')); | |
// The Drawing Code Goes Here.. | |
} | |
} | |
</script> | |
</head> | |
<body onload="drawCanvas();"> | |
<canvas id="tutorial" width="500" height="500"></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment