From bbe8add40c82d4e2360d453ff277be9ce351c8e4 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Mon, 22 Jun 2020 22:21:13 +0100 Subject: [PATCH] wasp: Switch to the faster fill routines Signed-off-by: Daniel Thompson --- wasp/apps/flashlight.py | 2 +- wasp/draw565.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wasp/apps/flashlight.py b/wasp/apps/flashlight.py index 5ca9734..12ba272 100644 --- a/wasp/apps/flashlight.py +++ b/wasp/apps/flashlight.py @@ -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) diff --git a/wasp/draw565.py b/wasp/draw565.py index f0313dc..86fdb36 100644 --- a/wasp/draw565.py +++ b/wasp/draw565.py @@ -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.