Skip to content

Commit 84a4afd

Browse files
committed
Corrected 1 & 3 rotation options (portrait) REF vroland#71
1 parent f70c4ae commit 84a4afd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/epd_driver/epd_driver.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ EpdRect _rotated_area(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
4949
case 1:
5050
_swap_int(x, y);
5151
_swap_int(w, h);
52-
x = EPD_HEIGHT - x - w;
52+
x = EPD_WIDTH - x - w;
5353
break;
5454

5555
case 2:
@@ -62,7 +62,7 @@ EpdRect _rotated_area(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
6262
// 3 270 ° portrait -> Corrected
6363
_swap_int(x, y);
6464
_swap_int(w, h);
65-
y = EPD_WIDTH - y - h;
65+
y = EPD_HEIGHT - y - h;
6666
break;
6767
}
6868
EpdRect rotated = {

0 commit comments

Comments
 (0)