turtle.resizemode() function in Python
Last Updated :
06 Aug, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
turtle.resizemode()
This function is used set resizemode to one of the values: “auto”, “user”, “noresize”. If no argument is given, return the current resizemode. resizemode(“user”) is called by a call of shapesize with arguments.
Syntax : turtle.resizemode(rmode=None)
Parameters:
rmode (optional): one of the strings “auto”, “user”, “noresize”
Different resizemodes have the following effects:
- “auto” adapts the appearance of the turtle corresponding to the value of pensize.
- “user” adapts the appearance of the turtle according to the values of stretchfactor and outlinewidth (outline), which are set by shapesize()
- “noresize” no adaption of the turtle’s appearance takes place.
Below is the implementation of the above method with some examples :
Example 1 :
Python3
import turtle
print (turtle.resizemode())
|
Output :
noresize
Example 2 :
Python3
import turtle
print (turtle.resizemode())
turtle.resizemode(rmode = "auto" )
print (turtle.resizemode())
turtle.resizemode(rmode = "user" )
print (turtle.resizemode())
|
Output :
noresize
auto
user
Share your thoughts in the comments
Please Login to comment...