turtle.setup()¶
-
turtle.setup(width=0.5, height=0.75, startx=None, starty=None)¶ Set the size and position of the main window.
Arguments: width: as integer a size in pixels, as float a fraction of the
Default is 50% of- height: as integer the height in pixels, as float a fraction of the
- Default is 75% of
- startx: if positive, starting position in pixels from the left
- edge of the screen, if negative from the right edge Default, startx=None is to center window horizontally.
- starty: if positive, starting position in pixels from the top
- edge of the screen, if negative from the bottom edge Default, starty=None is to center window vertically.
Examples: >>> setup (width=200, height=200, startx=0, starty=0)
sets window to 200x200 pixels, in upper left of screen
>>> setup(width=.75, height=0.5, startx=None, starty=None)
sets window to 75% of screen by 50% of screen and centers