1
0
Fork 0

wasp: st7789: Add positioning support to rleblit

This commit is contained in:
Daniel Thompson 2020-02-03 19:09:16 +00:00
parent 38c18b6403
commit 8168dd5939

View file

@ -94,9 +94,9 @@ class ST7789(object):
self.write_data(self.linebuffer) self.write_data(self.linebuffer)
@micropython.native @micropython.native
def rleblit(self, image, fg=0xffff, bg=0): def rleblit(self, image, pos=(0, 0), fg=0xffff, bg=0):
(sx, sy, rle) = image (sx, sy, rle) = image
self.set_window() self.set_window(pos[0], pos[1], sx, sy)
# TODO: rework algorithm to allow us to reuse the line buffer # TODO: rework algorithm to allow us to reuse the line buffer
buf = bytearray(2*sx) buf = bytearray(2*sx)