From ffb950869ce05bc758a52a6d6db808aeb75a4d6e Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 25 Mar 2020 17:36:38 -0500 Subject: [PATCH] Add EV3 screen examples This includes examples from the pybricks-projects repository --- doc/api/hubs_ev3brick.inc | 27 +++++++++++++++++++++++++++ pybricks-projects | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/doc/api/hubs_ev3brick.inc b/doc/api/hubs_ev3brick.inc index df2014d..fe2db67 100644 --- a/doc/api/hubs_ev3brick.inc +++ b/doc/api/hubs_ev3brick.inc @@ -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 diff --git a/pybricks-projects b/pybricks-projects index 6a57abb..8cf77b8 160000 --- a/pybricks-projects +++ b/pybricks-projects @@ -1 +1 @@ -Subproject commit 6a57abbff6a7e34665d4ce5de899df552ec57c59 +Subproject commit 8cf77b8576cf5553ed6c2de708e739a8cdf9cdc3