MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / screensize

Method screensize

tools/python-3.11.9-amd64/Lib/turtle.py:1486–1503  ·  view source on GitHub ↗

Resize the canvas the turtles are drawing on. Optional arguments: canvwidth -- positive integer, new width of canvas in pixels canvheight -- positive integer, new height of canvas in pixels bg -- colorstring or color-tuple, new backgroundcolor If no ar

(self, canvwidth=None, canvheight=None, bg=None)

Source from the content-addressed store, hash-verified

1484 self._bgpicname = picname
1485
1486 def screensize(self, canvwidth=None, canvheight=None, bg=None):
1487 """Resize the canvas the turtles are drawing on.
1488
1489 Optional arguments:
1490 canvwidth -- positive integer, new width of canvas in pixels
1491 canvheight -- positive integer, new height of canvas in pixels
1492 bg -- colorstring or color-tuple, new backgroundcolor
1493 If no arguments are given, return current (canvaswidth, canvasheight)
1494
1495 Do not alter the drawing window. To observe hidden parts of
1496 the canvas use the scrollbars. (Can make visible those parts
1497 of a drawing, which were outside the canvas before!)
1498
1499 Example (for a Turtle instance named turtle):
1500 >>> turtle.screensize(2000,1500)
1501 >>> # e.g. to search for an erroneously escaped turtle ;-)
1502 """
1503 return self._resize(canvwidth, canvheight, bg)
1504
1505 onscreenclick = onclick
1506 resetscreen = reset

Callers 1

setworldcoordinatesMethod · 0.95

Calls 1

_resizeMethod · 0.80

Tested by

no test coverage detected