Created
October 17, 2014 16:33
-
-
Save whistler/79ebc3e1ed42b326ac97 to your computer and use it in GitHub Desktop.
Add Image to Canvas
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
window.onload = function () | |
{ | |
var canvas = document.getElementById("overlay_canvas"); | |
var ctx = canvas.getContext("2d"); | |
var image = new Image(); | |
image.src = "http://placekitten.com/4536/3024"; | |
image.onload = function () { | |
ctx.drawImage(image, 0, 0); | |
image_ctx = image.getContext("2d"); | |
debugger; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment