Created
May 31, 2010 07:57
-
-
Save philogb/419639 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
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