MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / __init__

Method __init__

Python/Turtle.py:378–389  ·  view source on GitHub ↗
(self, cv)

Source from the content-addressed store, hash-verified

376 return TK.PhotoImage(file=filename, master=self.cv)
377
378 def __init__(self, cv):
379 self.cv = cv
380 if isinstance(cv, ScrolledCanvas):
381 w = self.cv.canvwidth
382 h = self.cv.canvheight
383 else: # expected: ordinary TK.Canvas
384 w = int(self.cv.cget("width"))
385 h = int(self.cv.cget("height"))
386 self.cv.config(scrollregion = (-w//2, -h//2, w//2, h//2 ))
387 self.canvwidth = w
388 self.canvheight = h
389 self.xscale = self.yscale = 1.0
390
391 def _createpoly(self):
392 """Create an invisible polygon item on canvas self.cv)

Callers

nothing calls this directly

Calls 2

cgetMethod · 0.80
configMethod · 0.80

Tested by

no test coverage detected