From d84d55093b7568caacfb6b8d826a7091e965ae78 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Sat, 4 Feb 2023 14:24:48 -0500 Subject: [PATCH] Fix fill --- adafruit_framebuf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_framebuf.py b/adafruit_framebuf.py index 544c44c..fa37ae4 100755 --- a/adafruit_framebuf.py +++ b/adafruit_framebuf.py @@ -68,7 +68,8 @@ class GS2HMSBFormat: def fill(framebuf, color): """completely fill/clear the buffer with a color""" if color: - fill = color & 0b11 + bits = (color & 0b11) + fill = (bits << 6) | (bits << 4) | (bits << 2) | (bits << 0) else: fill = 0x00 for i in range(len(framebuf.buf)): # pylint: disable=consider-using-enumerate