diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-09 00:00:13 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-03-09 00:00:13 (GMT) |
| commit | 031d139b7c31f83791c8c35cc78624aa1eda6da2 (patch) | |
| tree | 0322cf93239101571d3e8b1c29a9e0980313abe0 /wasp/demo.py | |
| parent | 5413d826d7ffe825b759cd013f9f68e9311aee01 (diff) | |
wasp: draw565: Refactor to allow apps to focus on the drawable.
Diffstat (limited to 'wasp/demo.py')
| -rw-r--r-- | wasp/demo.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wasp/demo.py b/wasp/demo.py index 66cc0c8..6d3f6f5 100644 --- a/wasp/demo.py +++ b/wasp/demo.py @@ -7,7 +7,7 @@ # len(colors) is not a multiple of 5 ;-) ). # -import watch, logo, time, gc, draw565 +import watch, logo, time, gc colors = ( 0xffff, @@ -24,10 +24,9 @@ colors = ( 0xf81f, # magenta ) -draw = draw565.Draw565(watch.display) - def textdemo(): watch.display.fill(0) + draw = watch.drawable draw.string("The quick brown", 12, 24) draw.string("fox jumped over", 12, 48) draw.string("the lazy dog.", 12, 72) @@ -57,7 +56,7 @@ def run(): l = logo.pine64 watch.display.fill(0) - watch.display.rleblit(l, fg=c) + watch.drawable.rleblit(l, fg=c) time.sleep(2) gc.collect() |
