Skip to content

Instantly share code, notes, and snippets.

@dennisschaaf
Created December 20, 2011 00:35
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 dennisschaaf/1499612 to your computer and use it in GitHub Desktop.
Save dennisschaaf/1499612 to your computer and use it in GitHub Desktop.
Simple Canvas Example
<!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