Skip to content

Instantly share code, notes, and snippets.

@andrepadez
Created August 24, 2012 11:30
Show Gist options
  • Save andrepadez/3449453 to your computer and use it in GitHub Desktop.
Save andrepadez/3449453 to your computer and use it in GitHub Desktop.
{"libraries":[]}
#tileGame {width:600px; height:600px; border: 1px solid}
<canvas id="tileGame"></canvas>
var ctx = document.getElementById('tileGame').getContext('2d');
var imageUrl = 'http://fc06.deviantart.net/fs70/f/2012/104/0/8/angierk_ask_blog_icon_bla_bla_bla_lol_by_standardangie-d4w5n71.png';
var image = new Image();
image.width = "500px";
image.height="500px";
image.src = imageUrl;
ctx.drawImage(image, 0, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment