MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / pensize

Method pensize

tools/python-3.11.9-amd64/Lib/turtle.py:2073–2093  ·  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 li

(self, width=None)

Source from the content-addressed store, hash-verified

2071 self.pen(resizemode=rmode)
2072
2073 def pensize(self, width=None):
2074 """Set or return the line thickness.
2075
2076 Aliases: pensize | width
2077
2078 Argument:
2079 width -- positive number
2080
2081 Set the line thickness to width or return it. If resizemode is set
2082 to "auto" and turtleshape is a polygon, that polygon is drawn with
2083 the same line thickness. If no argument is given, current pensize
2084 is returned.
2085
2086 Example (for a Turtle instance named turtle):
2087 >>> turtle.pensize()
2088 1
2089 >>> turtle.pensize(10) # from here on lines of width 10 are drawn
2090 """
2091 if width is None:
2092 return self._pensize
2093 self.pen(pensize=width)
2094
2095
2096 def penup(self):

Callers 5

dotMethod · 0.80
demo2Function · 0.80
mainFunction · 0.80
__init__Method · 0.80
treeFunction · 0.80

Calls 1

penMethod · 0.95

Tested by

no test coverage detected