Commit b949ff84 by doszhang

dos

parent 9bc9bc9a
...@@ -448,10 +448,9 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) { ...@@ -448,10 +448,9 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) {
} }
function drawImage(ctx, myCanvas, img, imgInfo) { function drawImage(ctx, myCanvas, img, imgInfo) {
ctx.save(); ctx.save();
ctx.clearRect(0, 0, myCanvas.width, myCanvas.height); ctx.clearRect(0, 0, myCanvas.width, myCanvas.height);
ctx.drawImage(black, 0, 0);
ctx.globalCompositeOperation = 'source-in';
ctx.translate(myCanvas.width / 2, myCanvas.height / 2); ctx.translate(myCanvas.width / 2, myCanvas.height / 2);
ctx.translate(imgInfo.x, imgInfo.y); ctx.translate(imgInfo.x, imgInfo.y);
ctx.rotate(Math.PI / 180 * imgInfo.rotation); ctx.rotate(Math.PI / 180 * imgInfo.rotation);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment