summaryrefslogtreecommitdiff
path: root/tests/extmod/framebuf1.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-12-05 11:55:43 +1100
committerDamien George <damien.p.george@gmail.com>2016-12-05 11:55:43 +1100
commit042d5f24d6e5119f0e15903c1e435e2e6473f72d (patch)
tree519950aa33215f30aae86935e343b4cd13a09378 /tests/extmod/framebuf1.py
parent374ed317c587dfc5ffcd9bdbe21aaa39d81c246b (diff)
tests/extmod/framebuf1: Add basics tests for hline, vline, rect, line.
Diffstat (limited to 'tests/extmod/framebuf1.py')
-rw-r--r--tests/extmod/framebuf1.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/extmod/framebuf1.py b/tests/extmod/framebuf1.py
index 7faad7181..7be365528 100644
--- a/tests/extmod/framebuf1.py
+++ b/tests/extmod/framebuf1.py
@@ -30,6 +30,26 @@ print(buf)
# get pixel
print(fbuf.pixel(0, 0), fbuf.pixel(1, 1))
+# hline
+fbuf.fill(0)
+fbuf.hline(0, 1, w, 1)
+print('hline', buf)
+
+# vline
+fbuf.fill(0)
+fbuf.vline(1, 0, h, 1)
+print('vline', buf)
+
+# rect
+fbuf.fill(0)
+fbuf.rect(1, 1, 3, 3, 1)
+print('rect', buf)
+
+# line
+fbuf.fill(0)
+fbuf.line(1, 1, 3, 3, 1)
+print('line', buf)
+
# scroll
fbuf.fill(0)
fbuf.pixel(2, 7, 1)