MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / pensize

Method pensize

Python/Turtle.py:1971–1991  ·  view source on GitHub ↗

Set or return the line thickness. Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickn

(self, width=None)

Source from the content-addressed store, hash-verified

1969 self.pen(resizemode=rmode)
1970
1971 def pensize(self, width=None):
1972 """Set or return the line thickness.
1973
1974 Aliases: pensize | width
1975
1976 Argument:
1977 width -- positive number
1978
1979 Set the line thickness to width or return it. If resizemode is set
1980 to "auto" and turtleshape is a polygon, that polygon is drawn with
1981 the same line thickness. If no argument is given, current pensize
1982 is returned.
1983
1984 Example (for a Turtle instance named turtle):
1985 >>> turtle.pensize()
1986 1
1987 >>> turtle.pensize(10) # from here on lines of width 10 are drawn
1988 """
1989 if width is None:
1990 return self._pensize
1991 self.pen(pensize=width)
1992
1993
1994 def penup(self):

Callers 3

myFunFunction · 0.80
dotMethod · 0.80
demo2Function · 0.80

Calls 1

penMethod · 0.95

Tested by

no test coverage detected