diff options
author | Alex March <alex.march.dev@gmail.com> | 2016-10-26 11:36:06 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-11-03 00:10:17 +1100 |
commit | 94aeba0427cc80e43b59c4155e02e8cb7c327951 (patch) | |
tree | d945e1599f0a01308065145740e4a27ffc240c9d /tests/extmod/framebuf1.py | |
parent | f9b6b37cf65c4f65c4ad461d439fbf624c0f10c1 (diff) |
tests/extmod/framebuf1: Test framebuffer pixel clear, and text function.
Diffstat (limited to 'tests/extmod/framebuf1.py')
-rw-r--r-- | tests/extmod/framebuf1.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/extmod/framebuf1.py b/tests/extmod/framebuf1.py index f550b6b4f..52899028c 100644 --- a/tests/extmod/framebuf1.py +++ b/tests/extmod/framebuf1.py @@ -23,6 +23,10 @@ fbuf.pixel(0, 15, 1) fbuf.pixel(4, 15, 1) print(buf) +# clear pixel +fbuf.pixel(4, 15, 0) +print(buf) + # get pixel print(fbuf.pixel(0, 0), fbuf.pixel(1, 1)) @@ -39,3 +43,14 @@ fbuf.scroll(-1, 0) print(buf) fbuf.scroll(2, 2) print(buf) + +# print text +fbuf.fill(0) +fbuf.text("hello", 0, 0, 1) +print(buf) +fbuf.text("hello", 0, 0, 0) # clear +print(buf) + +# char out of font range set to chr(127) +fbuf.text(str(chr(31)), 0, 0) +print(buf) |