Skip to content

Commit

Permalink
Add ellipsemode docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rlafuente committed May 3, 2018
1 parent 29ff09f commit 23eea15
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions doc/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,31 @@ Drawing shapes
stroke(0.1, 0.1, 0.8)
rect(25, 25, 40, 40)

.. py:function:: ellipsemode(mode=None)
Change the way ellipses are specified. Each mode alters the parameters
necessary to draw an ellipse using the :py:func:`ellipse` function.

It works exactly the same as the :py:func:`rectmode` command.

.. shoebot::
:snapshot:

nofill()
strokewidth(2)

ellipsemode(CORNER) # default, red
stroke(0.8, 0.1, 0.1)
ellipse(25, 25, 40, 40)

ellipsemode(CENTER) # green
stroke(0.1, 0.8, 0.1)
ellipse(25, 25, 40, 40)

ellipsemode(CORNERS) # blue
stroke(0.1, 0.1, 0.8)
ellipse(25, 25, 40, 40)

Bézier paths
------------

Expand Down

0 comments on commit 23eea15

Please sign in to comment.