Skip to content

Commit 8a17b60

Browse files
committed
fix pixel rotaion
1 parent 8febfe8 commit 8a17b60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_framebuf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def pixel(self, x, y, color=None):
193193
x = self.width - x - 1
194194
if self.rotation == 2:
195195
x = self.width - x - 1
196-
y = self.width - y - 1
196+
y = self.height - y - 1
197197
if self.rotation == 3:
198198
x, y = y, x
199-
y = self.width - y - 1
199+
y = self.height - y - 1
200200

201201
if x < 0 or x >= self.width or y < 0 or y >= self.height:
202202
return None

0 commit comments

Comments
 (0)