wasp: Switch to the faster fill routines

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
Daniel Thompson 2020-06-22 22:21:13 +01:00
parent 04a8daeff4
commit bbe8add40c
2 changed files with 3 additions and 3 deletions

View file

@ -33,4 +33,4 @@ class FlashlightApp(object):
def draw(self):
"""Redraw the display from scratch."""
wasp.watch.display.fill(0xffff)
wasp.watch.drawable.fill(0xffff)

View file

@ -296,7 +296,7 @@ class Draw565(object):
(w, h) = _bounding_box(s, font)
leftpad = (width - w) // 2
rightpad = width - w - leftpad
display.fill(0, x, y, leftpad, h)
self.fill(0, x, y, leftpad, h)
x += leftpad
for ch in s:
@ -305,7 +305,7 @@ class Draw565(object):
x += glyph[2] + 1
if width:
display.fill(0, x, y, rightpad, h)
self.fill(0, x, y, rightpad, h)
def wrap(self, s, width):
"""Chunk a string so it can rendered within a specified width.