Commit e82021ee by doszhang

dos

parent ccceb07f
......@@ -477,11 +477,11 @@ function drawImage(ctx, myCanvas, img, imgInfo) {
ctx.save();
ctx.clearRect(0, 0, myCanvas.width, myCanvas.height);
ctx.translate(myCanvas.width, myCanvas.height);
ctx.translate(myCanvas.width / 2, myCanvas.height / 2);
ctx.translate(imgInfo.x, imgInfo.y);
ctx.rotate(Math.PI / 180 * imgInfo.rotation);
ctx.scale(imgInfo.scale, imgInfo.scale);
ctx.drawImage(img, -img.width, -img.height);
ctx.drawImage(img, -img.width * 2, -img.height * 2);
ctx.restore();
}
......
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