wasp: st7789: Add positioning support to rleblit
This commit is contained in:
parent
38c18b6403
commit
8168dd5939
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue