Skip to content

Commit

Permalink
Add EV3 screen examples
Browse files Browse the repository at this point in the history
This includes examples from the pybricks-projects repository
  • Loading branch information
dlech authored and laurensvalk committed Mar 26, 2020
1 parent 95e808d commit ffb9508
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions doc/api/hubs_ev3brick.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ffb9508

Please sign in to comment.