|
@@ -162,8 +162,8 @@
|
|
|
canvas.width = rotated.width;
|
|
canvas.width = rotated.width;
|
|
|
canvas.height = rotated.height;
|
|
canvas.height = rotated.height;
|
|
|
context.save();
|
|
context.save();
|
|
|
- context.translate(0.5, 0.5);
|
|
|
|
|
- // context.translate(rotated.width / 2, rotated.height / 2);
|
|
|
|
|
|
|
+ // context.translate(0.5, 0.5);
|
|
|
|
|
+ context.translate(rotated.width / 2, rotated.height / 2);
|
|
|
context.rotate(rotate * Math.PI / 180);
|
|
context.rotate(rotate * Math.PI / 180);
|
|
|
context.drawImage(image, -width / 2, -height / 2, width, height);
|
|
context.drawImage(image, -width / 2, -height / 2, width, height);
|
|
|
context.restore();
|
|
context.restore();
|