Skip to content

Commit

Permalink
[doc] Improve description of the pos parameter in gui (#1904)
Browse files Browse the repository at this point in the history
  • Loading branch information
houkensjtu authored Oct 4, 2020
1 parent 8b04c03 commit eba3e25
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ Create a window
Paint on a window
-----------------

Taichi's GUI supports painting simple geometric objects, such as lines, triangles, rectangles, circles, and text.


.. note::

The position parameter ``pos`` expects an input of a 2-element tuple, whose values are the relative position of the object.
``(0.0, 0.0)`` stands for the lower left corner of the window, and ``(1.0, 1.0)`` stands for the upper right corner.


.. function:: gui.set_image(img)

Expand Down

0 comments on commit eba3e25

Please sign in to comment.