mirror of
https://github.com/lrsjng/jquery-qrcode.git
synced 2026-08-12 20:01:55 +08:00
Stroke.
This commit is contained in:
@@ -31,6 +31,7 @@ var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]',
|
|||||||
|
|
||||||
fill: $("#fill").val(),
|
fill: $("#fill").val(),
|
||||||
background: $("#background").val(),
|
background: $("#background").val(),
|
||||||
|
// fill: $("#img-buffer")[0],
|
||||||
|
|
||||||
text: $("#text").val(),
|
text: $("#text").val(),
|
||||||
size: parseInt($("#size").val(), 10),
|
size: parseInt($("#size").val(), 10),
|
||||||
|
|||||||
@@ -273,6 +273,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($(settings.fill).is('img')) {
|
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.clip();
|
||||||
context.drawImage(settings.fill, 0, 0, settings.size, settings.size);
|
context.drawImage(settings.fill, 0, 0, settings.size, settings.size);
|
||||||
context.restore();
|
context.restore();
|
||||||
|
|||||||
Reference in New Issue
Block a user