I am using HTML5 canvas as follows:
function draw(e){ ctx.drawImage(img, 0, 0); if(e){ ctx.fillStyle='red'; ctx.fillRect(5, 5, 50, 15); ctx.fillStyle='white'; }else{ ctx.fillStyle='black'; } ctx.fillText('Label', 10, 17); } draw(); document.onclick=draw;