Fix alignment of rotated image layers
This commit is contained in:
@@ -252,17 +252,7 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
||||
previousAlpha = context.globalAlpha;
|
||||
context.globalAlpha = opacity;
|
||||
}
|
||||
context.drawImage(
|
||||
img,
|
||||
0,
|
||||
0,
|
||||
+img.width,
|
||||
+img.height,
|
||||
Math.round(dx),
|
||||
Math.round(dy),
|
||||
Math.round(dw),
|
||||
Math.round(dh)
|
||||
);
|
||||
context.drawImage(img, 0, 0, +img.width, +img.height, dx, dy, dw, dh);
|
||||
if (opacity !== 1) {
|
||||
context.globalAlpha = previousAlpha;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
Reference in New Issue
Block a user