MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/turtle.py:477–488  ·  view source on GitHub ↗
(self, cv)

Source from the content-addressed store, hash-verified

475 return TK.PhotoImage(file=filename, master=self.cv)
476
477 def __init__(self, cv):
478 self.cv = cv
479 if isinstance(cv, ScrolledCanvas):
480 w = self.cv.canvwidth
481 h = self.cv.canvheight
482 else: # expected: ordinary TK.Canvas
483 w = int(self.cv.cget("width"))
484 h = int(self.cv.cget("height"))
485 self.cv.config(scrollregion = (-w//2, -h//2, w//2, h//2 ))
486 self.canvwidth = w
487 self.canvheight = h
488 self.xscale = self.yscale = 1.0
489
490 def _createpoly(self):
491 """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