0
然后我使用大画布图像和createPattern for strokestyle我有滞后。 有两种款式:铅笔和橡皮擦(橡皮擦是从其他的帆布风格createrPattern)HTML5 Canvas strokeStyle from createPattern
演示:http://jsfiddle.net/y059fujd/
这是代码的地方,然后我创建的风格模式:
$("#eraser").click(function() {
ctx.lineWidth = 5;
ctx.globalCompositeOperation = "source-over";
ctx.strokeStyle = ctx.createPattern(canvasBig, 'no-repeat');
});
我需要备份的,因为我使用变焦。我缩放是image.width *缩放和image.height *缩放 – Asker 2014-10-06 10:56:49