summaryrefslogtreecommitdiffstats
path: root/Doc/library/turtle.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/turtle.rst')
-rw-r--r--Doc/library/turtle.rst42
1 files changed, 21 insertions, 21 deletions
diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst
index 5f9bf18..3155d87 100644
--- a/Doc/library/turtle.rst
+++ b/Doc/library/turtle.rst
@@ -1587,7 +1587,7 @@ The public classes of the module :mod:`turtle`
Subclass of TurtleScreen, with :ref:`four methods added <screenspecific>`.
-
+
.. class:: ScrolledCavas(master)
:param master: some Tkinter widget to contain the ScrolledCanvas, i.e.
@@ -1612,13 +1612,13 @@ The public classes of the module :mod:`turtle`
"compound" ``None`` (a compund shape has to be constructed using the
:meth:`addcomponent` method)
=========== ===========
-
+
.. method:: addcomponent(poly, fill, outline=None)
:param poly: a polygon, i.e. a tuple of pairs of numbers
:param fill: a color the *poly* will be filled with
:param outline: a color for the poly's outline (if given)
-
+
Example:
>>> poly = ((0,0),(10,-5),(0,10),(-10,-5))
@@ -1662,31 +1662,31 @@ facilities:
>>> help(Screen.bgcolor)
Help on method bgcolor in module turtle:
-
+
bgcolor(self, *args) unbound turtle.Screen method
Set or return backgroundcolor of the TurtleScreen.
-
+
Arguments (if given): a color string or three numbers
in the range 0..colormode or a 3-tuple of such numbers.
-
-
+
+
>>> screen.bgcolor("orange")
>>> screen.bgcolor()
"orange"
>>> screen.bgcolor(0.5,0,0.5)
>>> screen.bgcolor()
"#800080"
-
+
>>> help(Turtle.penup)
Help on method penup in module turtle:
-
+
penup(self) unbound turtle.Turtle method
Pull the pen up -- no drawing when moving.
-
+
Aliases: penup | pu | up
-
+
No argument
-
+
>>> turtle.penup()
- The docstrings of the functions which are derived from methods have a modified
@@ -1694,32 +1694,32 @@ facilities:
>>> help(bgcolor)
Help on function bgcolor in module turtle:
-
+
bgcolor(*args)
Set or return backgroundcolor of the TurtleScreen.
-
+
Arguments (if given): a color string or three numbers
in the range 0..colormode or a 3-tuple of such numbers.
-
+
Example::
-
+
>>> bgcolor("orange")
>>> bgcolor()
"orange"
>>> bgcolor(0.5,0,0.5)
>>> bgcolor()
"#800080"
-
+
>>> help(penup)
Help on function penup in module turtle:
-
+
penup()
Pull the pen up -- no drawing when moving.
-
+
Aliases: penup | pu | up
-
+
No argument
-
+
Example:
>>> penup()