Add EV3 screen examples

This includes examples from the pybricks-projects repository
This commit is contained in:
David Lechner
2020-03-26 13:58:02 +01:00
committed by laurensvalk
parent 95e808df9d
commit ffb950869c
2 changed files with 28 additions and 1 deletions
+27
View File
@@ -158,20 +158,47 @@
.. automethod:: pybricks.hubs::EV3Brick.screen.print
.. toggle-header::
:header: **Show/hide example**
**Example: Say hello... in several ways.**
.. literalinclude:: ../../pybricks-projects/snippets/ev3/screen_print/main.py
.. automethod:: pybricks.hubs::EV3Brick.screen.set_font
**Example:** See example in :meth:`print`.
.. automethod:: pybricks.hubs::EV3Brick.screen.load_image
.. toggle-header::
:header: **Show/hide example**
**Example: Show an image on the screen.**
.. literalinclude:: ../../pybricks-projects/snippets/ev3/screen_image/main.py
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_image
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_pixel
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_line
.. toggle-header::
:header: **Show/hide example**
**Example: Draw some shapes on the screen.**
.. literalinclude:: ../../pybricks-projects/snippets/ev3/screen_draw/main.py
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_box
**Example:** See example in :meth:`draw_line`.
.. automethod:: pybricks.hubs::EV3Brick.screen.draw_circle
**Example:** See example in :meth:`draw_line`.
.. autoattribute:: pybricks.hubs::EV3Brick.screen.width
.. autoattribute:: pybricks.hubs::EV3Brick.screen.height