I\'m trying to get an image to fill up my canvas. Here is the code I\'m trying:
var blueprint_background = new Image();
blueprint_background.src = \'images/
You have to wait until the image loads, use the image's onload property to know when it loads.
var blueprint_background = new Image();
blueprint_background.src = 'images/blueprint_background.png';
blueprint_background.onload = function(){
var pattern = context.createPattern(this, "repeat");
context.fillStyle = pattern;
context.fill();
};