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 co
(self, rmode=None)
| 2043 | self._outlinewidth = 1 |
| 2044 | |
| 2045 | def resizemode(self, rmode=None): |
| 2046 | """Set resizemode to one of the values: "auto", "user", "noresize". |
| 2047 | |
| 2048 | (Optional) Argument: |
| 2049 | rmode -- one of the strings "auto", "user", "noresize" |
| 2050 | |
| 2051 | Different resizemodes have the following effects: |
| 2052 | - "auto" adapts the appearance of the turtle |
| 2053 | corresponding to the value of pensize. |
| 2054 | - "user" adapts the appearance of the turtle according to the |
| 2055 | values of stretchfactor and outlinewidth (outline), |
| 2056 | which are set by shapesize() |
| 2057 | - "noresize" no adaption of the turtle's appearance takes place. |
| 2058 | If no argument is given, return current resizemode. |
| 2059 | resizemode("user") is called by a call of shapesize with arguments. |
| 2060 | |
| 2061 | |
| 2062 | Examples (for a Turtle instance named turtle): |
| 2063 | >>> turtle.resizemode("noresize") |
| 2064 | >>> turtle.resizemode() |
| 2065 | 'noresize' |
| 2066 | """ |
| 2067 | if rmode is None: |
| 2068 | return self._resizemode |
| 2069 | rmode = rmode.lower() |
| 2070 | if rmode in ["auto", "user", "noresize"]: |
| 2071 | self.pen(resizemode=rmode) |
| 2072 | |
| 2073 | def pensize(self, width=None): |
| 2074 | """Set or return the line thickness. |