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

Method __init__

tools/python-3.11.9-amd64/Lib/turtle.py:481–492  ·  view source on GitHub ↗
(self, cv)

Source from the content-addressed store, hash-verified

479 return TK.PhotoImage(file=filename, master=self.cv)
480
481 def __init__(self, cv):
482 self.cv = cv
483 if isinstance(cv, ScrolledCanvas):
484 w = self.cv.canvwidth
485 h = self.cv.canvheight
486 else: # expected: ordinary TK.Canvas
487 w = int(self.cv.cget("width"))
488 h = int(self.cv.cget("height"))
489 self.cv.config(scrollregion = (-w//2, -h//2, w//2, h//2 ))
490 self.canvwidth = w
491 self.canvheight = h
492 self.xscale = self.yscale = 1.0
493
494 def _createpoly(self):
495 """Create an invisible polygon item on canvas self.cv)

Callers

nothing calls this directly

Calls 2

cgetMethod · 0.45
configMethod · 0.45

Tested by

no test coverage detected