Skip to content

Commit

Permalink
Add basic rectmode() example to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rlafuente committed May 3, 2018
1 parent 15ea207 commit 29ff09f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@ Drawing shapes
:py:func:`rectmode` to change the function's behaviour according to what might suit your
script's needs.

.. shoebot::
:snapshot:

nofill()
strokewidth(2)

rectmode(CORNER) # default, red
stroke(0.8, 0.1, 0.1)
rect(25, 25, 40, 40)

rectmode(CENTER) # green
stroke(0.1, 0.8, 0.1)
rect(25, 25, 40, 40)

rectmode(CORNERS) # blue
stroke(0.1, 0.1, 0.8)
rect(25, 25, 40, 40)

Bézier paths
------------
Expand Down

0 comments on commit 29ff09f

Please sign in to comment.