drawImage example 1
function boot() {
draw(document.getElementById('canvas').getContext('2d'));
draw(document.getElementById('vmlcanvas').getContext('2d'));
}
function draw(ctx) {
var img = new Image();
img.onload = function(){
ctx.drawImage(img,0,0);
ctx.beginPath();
ctx.moveTo(30,96);
ctx.lineTo(70,66);
ctx.lineTo(103,76);
ctx.lineTo(170,15);
ctx.stroke();
}
img.src = 'images/backdrop.png?' + new Date().getTime();
}