From: FoamyGuy Date: Fri, 3 Jul 2020 13:44:52 +0000 (-0500) Subject: trying to implement fill_row function X-Git-Tag: 0.5.1^2~3 X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/commitdiff_plain/8a55694f3ba44676a091eafa7cb491075108be9f trying to implement fill_row function --- diff --git a/displayio/display.py b/displayio/display.py index 3f93177..4fc2bf7 100644 --- a/displayio/display.py +++ b/displayio/display.py @@ -341,8 +341,8 @@ class Display: """Extract the pixels from a single row""" for x in range(0, self._width): _rgb_565 = self._rgb_tuple_to_rgb565(self._buffer.getpixel((x, y))) - buffer[x * 2] = _rgb_565 >> 8 - buffer[x * 2 + 1] = _rgb_565 + buffer[x * 2] = (_rgb_565 >> 8) & 0xff + buffer[x * 2 + 1] = _rgb_565 & 0xff #(data[i * 2] << 8) + data[i * 2 + 1] return buffer