Commit 5124413d by doszhang

dos

parent a9369219
......@@ -226,11 +226,11 @@ $(document).ready(function () {
} else {
scale = 1000 / height;
}
uploadctx.scale(scale, scale);
uploadctx.scale(2, 2);
uploadedImg.width = width;
uploadedImg.height = height;
uploadctx.translate(uploadedImg.width / 2, uploadedImg.height / 2);
uploadctx.scale(scale, scale);
uploadctx.scale(2, 2);
uploadctx.rotate(Math.PI / 180 * rotation);
uploadctx.drawImage(objectImg, -objectImg.width / 2, -objectImg.height / 2);
// $('.canvas').html( '<img src="'+base64Img+'">');
......@@ -265,7 +265,7 @@ var drawImage = function () {
ctx.translate(canvas.width / 2, canvas.height / 2);
ctx.translate(imgInfo.x, imgInfo.y);
ctx.rotate(Math.PI / 180 * imgInfo.rotation);
ctx.scale(2, 2);
ctx.scale(imgInfo.scale, imgInfo.scale);
ctx.drawImage(uploadedImg, -uploadedImg.width / 2, -uploadedImg.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