Files
pybricks-api/doc/main/parameters/image.rst
T
Laurens Valk adf8ed6b56 pybricks.hubs: Enable EV3.
First pass including Image and ImageFile. Largely migrated from old ev3dev version. We can refine this for the embedded version in the next commits.
2026-08-25 11:42:05 +02:00

60 lines
1.4 KiB
ReStructuredText

.. pybricks-requirements:: ev3
Image
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. |this image| replace:: this image
.. autoclass:: pybricks.parameters.Image
:no-members:
.. automethod:: pybricks.parameters.Image.empty
.. rubric:: Drawing text
There are two ways to draw text on images. :meth:`draw_text` lets text be
placed precisely on the image or :meth:`print` can be used to automatically
print text on a new line.
.. automethod:: pybricks.parameters.Image.draw_text
.. automethod:: pybricks.parameters.Image.print
.. automethod:: pybricks.parameters.Image.set_font
.. rubric:: Drawing images
A copy of another image can be drawn on an image. Also consider using
sub-images to copy part of an image.
.. automethod:: pybricks.parameters.Image.draw_image
.. rubric:: Drawing shapes
These are the methods to draw basic shapes, including points, lines,
rectangles and circles.
.. automethod:: pybricks.parameters.Image.draw_pixel
.. automethod:: pybricks.parameters.Image.draw_line
.. automethod:: pybricks.parameters.Image.draw_box
.. automethod:: pybricks.parameters.Image.draw_circle
.. rubric:: Image properties
.. autoattribute:: pybricks.parameters.Image.width
.. autoattribute:: pybricks.parameters.Image.height
.. rubric:: Replacing the entire image
.. automethod:: pybricks.parameters.Image.clear
.. automethod:: pybricks.parameters.Image.load_image