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

Method resizemode

Python/Turtle.py:1943–1969  ·  view source on GitHub ↗

Set resizemode to one of the values: "auto", "user", "noresize". (Optional) Argument: rmode -- one of the strings "auto", "user", "noresize" Different resizemodes have the following effects: - "auto" adapts the appearance of the turtle correspon

(self, rmode=None)

Source from the content-addressed store, hash-verified

1941 self._outlinewidth = 1
1942
1943 def resizemode(self, rmode=None):
1944 """Set resizemode to one of the values: "auto", "user", "noresize".
1945
1946 (Optional) Argument:
1947 rmode -- one of the strings "auto", "user", "noresize"
1948
1949 Different resizemodes have the following effects:
1950 - "auto" adapts the appearance of the turtle
1951 corresponding to the value of pensize.
1952 - "user" adapts the appearance of the turtle according to the
1953 values of stretchfactor and outlinewidth (outline),
1954 which are set by shapesize()
1955 - "noresize" no adaption of the turtle's appearance takes place.
1956 If no argument is given, return current resizemode.
1957 resizemode("user") is called by a call of shapesize with arguments.
1958
1959
1960 Examples (for a Turtle instance named turtle):
1961 >>> turtle.resizemode("noresize")
1962 >>> turtle.resizemode()
1963 'noresize'
1964 """
1965 if rmode is None:
1966 return self._resizemode
1967 rmode = rmode.lower()
1968 if rmode in ["auto", "user", "noresize"]:
1969 self.pen(resizemode=rmode)
1970
1971 def pensize(self, width=None):
1972 """Set or return the line thickness.

Callers 2

dotMethod · 0.80
demo2Function · 0.80

Calls 1

penMethod · 0.95

Tested by

no test coverage detected