Lines Matching defs:shape

137         'setundobuffer', 'setx', 'sety', 'shape', 'shapesize', 'shapetransform', 'shearfactor', 'showturtle',
160 "shape": "classic",
891 raise TurtleGraphicsError("There is no shape type %s" % type_)
895 """Add component to a shape of type compound.
1108 def register_shape(self, name, shape=None):
1109 """Adds a turtle shape to TurtleScreen's shapelist.
1112 (1) name is the name of a gif-file and shape is None.
1113 Installs the corresponding image shape.
1116 (2) name is an arbitrary string and shape is a tuple
1118 polygon shape
1119 (3) name is an arbitrary string and shape is a
1121 compound shape.
1122 To use a shape, you have to issue the command shape(shapename).
1131 if shape is None:
1134 shape = Shape("image", self._image(name))
1138 elif isinstance(shape, tuple):
1139 shape = Shape("polygon", shape)
1140 ## else shape assumed to be Shape-instance
1141 self._shapes[name] = shape
2521 shape=_CFG["shape"],
2546 self.turtle = _TurtleImage(screen, shape)
2754 def shape(self, name=None):
2755 """Set turtle shape to shape with given name / return current shapename.
2760 Set turtle shape to shape with given name or, if name is not given,
2761 return name of current shape.
2762 Shape with name must exist in the TurtleScreen's shape dictionary.
2768 >>> turtle.shape()
2770 >>> turtle.shape("turtle")
2771 >>> turtle.shape()
2777 raise TurtleGraphicsError("There is no shape named %s" % name)
2834 >>> turtle.shape("circle")
2856 >>> turtle.shape("circle")
2887 >>> turtle.shape("circle")
2920 >>> turtle.shape("circle")
2930 """Set or return the current transformation matrix of the turtle shape.
2943 >>> turtle.shape("square")
2957 raise TurtleGraphicsError("Bad shape transform matrix: must not be singular")
2970 """Computes transformed polygon shapes from a shape
2982 """Return the current shape polygon as tuple of coordinate pairs.
2987 >>> turtle.shape("square")
2993 shape = self.screen._shapes[self.turtle.shapeIndex]
2994 if shape._type == "polygon":
2995 return self._getshapepoly(shape._data, shape._type == "compound")
2999 """Calculate transformed shape polygon according to resizemode
3013 its shape, resizemode, stretch and tilt etc."""
3015 shape = screen._shapes[self.turtle.shapeIndex]
3016 ttype = shape._type
3020 tshape = shape._data
3025 shape = self._polytrafo(self._getshapepoly(tshape))
3027 screen._drawpoly(titem, shape, fill=fc, outline=oc,
3056 Stamp a copy of the turtle shape onto the canvas at the current
3067 shape = screen._shapes[self.turtle.shapeIndex]
3068 ttype = shape._type
3069 tshape = shape._data
3075 shape = self._polytrafo(self._getshapepoly(tshape))
3077 screen._drawpoly(stitem, shape, fill=fc, outline=oc,
3328 """Called just before drawing a shape to be filled.
3349 """Fill the shape drawn after the call begin_fill().
3826 shape=_CFG["shape"],
3832 shape=shape,
4108 shape("turtle")
4114 turtle.shape("turtle")