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)
| 2110 | self._outlinewidth = 1 |
| 2111 | |
| 2112 | def resizemode(self, rmode=None): |
| 2113 | """Set resizemode to one of the values: "auto", "user", "noresize". |
| 2114 | |
| 2115 | (Optional) Argument: |
| 2116 | rmode -- one of the strings "auto", "user", "noresize" |
| 2117 | |
| 2118 | Different resizemodes have the following effects: |
| 2119 | - "auto" adapts the appearance of the turtle |
| 2120 | corresponding to the value of pensize. |
| 2121 | - "user" adapts the appearance of the turtle according to the |
| 2122 | values of stretchfactor and outlinewidth (outline), |
| 2123 | which are set by shapesize() |
| 2124 | - "noresize" no adaption of the turtle's appearance takes place. |
| 2125 | If no argument is given, return current resizemode. |
| 2126 | resizemode("user") is called by a call of shapesize with arguments. |
| 2127 | |
| 2128 | |
| 2129 | Examples (for a Turtle instance named turtle): |
| 2130 | >>> turtle.resizemode("noresize") |
| 2131 | >>> turtle.resizemode() |
| 2132 | 'noresize' |
| 2133 | """ |
| 2134 | if rmode is None: |
| 2135 | return self._resizemode |
| 2136 | rmode = rmode.lower() |
| 2137 | if rmode in ["auto", "user", "noresize"]: |
| 2138 | self.pen(resizemode=rmode) |
| 2139 | |
| 2140 | def pensize(self, width=None): |
| 2141 | """Set or return the line thickness. |