Created
August 3, 2012 15:15
-
-
Save mkosler/3248552 to your computer and use it in GitHub Desktop.
Drawing an image onto the HTML5 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
// Taken from StackOverflow (http://stackoverflow.com/questions/11599113/dart-lang-how-to-load-image) | |
var image = new ImageElement(); | |
image.src = 'my_image.png'; | |
image.on.load.add((e) => /* draw image after it has loaded */ | |
// OR | |
context.drawIamge(image, x, y, width, height); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment