MCPcopy Index your code
hub / github.com/csev/py4e / move

Method move

code/graphics/graphics.py:484–503  ·  view source on GitHub ↗

move object dx units in x direction and dy units in y direction

(self, dx, dy)

Source from the content-addressed store, hash-verified

482 self.id = None
483
484 def move(self, dx, dy):
485
486 """move object dx units in x direction and dy units in y
487 direction"""
488
489 self._move(dx,dy)
490 canvas = self.canvas
491 if canvas and not canvas.isClosed():
492 trans = canvas.trans
493 if trans:
494 x = dx/ trans.xscale
495 y = -dy / trans.yscale
496 else:
497 x = dx
498 y = dy
499 #self.canvas.move(self.id, x, y)
500 _tkExec(self.canvas.move, self.id, x, y)
501 if canvas.autoflush:
502 #_root.update()
503 _tkCall(_root.update)
504
505 def _reconfig(self, option, setting):
506 # Internal method for changing configuration of the object

Callers 5

_moveMethod · 0.80
_moveMethod · 0.80
_moveMethod · 0.80
_moveMethod · 0.80
testFunction · 0.80

Calls 4

_moveMethod · 0.95
_tkExecFunction · 0.85
_tkCallFunction · 0.85
isClosedMethod · 0.80

Tested by

no test coverage detected