Skip to content

Instantly share code, notes, and snippets.

@philogb
Created May 31, 2010 07:57
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 philogb/419639 to your computer and use it in GitHub Desktop.
Save philogb/419639 to your computer and use it in GitHub Desktop.
function canvasTest() {
var canvas = document.createElement('canvas');
alert(typeof canvas.getContext('2d').fillText);
var ctx = canvas.getContext('2d');
canvas.widh = 500;
canvas.height = 500;
document.body.appendChild(canvas);
ctx.font = 'bold 12px Arial';
ctx.fillStyle= '#000';
ctx.fillText("Hello World", 200, 200);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment