pull/2/head
Lars Jung 12 years ago
parent cf982e4df5
commit 4aa9480bd3

@ -31,6 +31,7 @@ var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]',
fill: $("#fill").val(),
background: $("#background").val(),
// fill: $("#img-buffer")[0],
text: $("#text").val(),
size: parseInt($("#size").val(), 10),

@ -273,6 +273,14 @@
}
}
if ($(settings.fill).is('img')) {
context.strokeStyle = 'rgba(0,0,0,0.5)';
context.lineWidth = 2;
context.stroke();
var prev = context.globalCompositeOperation;
context.globalCompositeOperation = "destination-out";
context.fill();
context.globalCompositeOperation = prev;
context.clip();
context.drawImage(settings.fill, 0, 0, settings.size, settings.size);
context.restore();

Loading…
Cancel
Save