Skip to content

Commit 4869e60

Browse files
committed
Fix preview rotation
1 parent 05d366e commit 4869e60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

PreviewWidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ void PreviewWidget::rotate(int & x, int & y) const {
6767
int tmp;
6868
switch (flip) {
6969
case 3:
70-
x = width - x;
71-
y = height - y;
70+
x = width - 1 - x;
71+
y = height - 1 - y;
7272
break;
7373
case 5:
7474
tmp = x;
75-
x = height - y;
75+
x = height - 1 - y;
7676
y = tmp;
7777
break;
7878
case 6:
7979
tmp = x;
8080
x = y;
81-
y = width - tmp;
81+
y = width - 1 - tmp;
8282
break;
8383
}
8484
}

0 commit comments

Comments
 (0)