MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / move

Method move

PySimpleGUI/PySimpleGUI.py:6652–6668  ·  view source on GitHub ↗

Moves the entire drawing area (the canvas) by some delta from the current position. Units are indicated in your coordinate system indicated number of ticks in your coordinate system :param x_direction: how far to move in the "X" direction in your coordinates :type x_direct

(self, x_direction, y_direction)

Source from the content-addressed store, hash-verified

6650 self._visible = visible
6651
6652 def move(self, x_direction, y_direction):
6653 """
6654 Moves the entire drawing area (the canvas) by some delta from the current position. Units are indicated in your coordinate system indicated number of ticks in your coordinate system
6655
6656 :param x_direction: how far to move in the "X" direction in your coordinates
6657 :type x_direction: int | float
6658 :param y_direction: how far to move in the "Y" direction in your coordinates
6659 :type y_direction: int | float
6660 """
6661 zero_converted = self._convert_xy_to_canvas_xy(0, 0)
6662 shift_converted = self._convert_xy_to_canvas_xy(x_direction, y_direction)
6663 shift_amount = (shift_converted[0] - zero_converted[0], shift_converted[1] - zero_converted[1])
6664 if self._TKCanvas2 is None:
6665 print('*** WARNING - The Graph element has not been finalized and cannot be drawn upon ***')
6666 print('Call Window.Finalize() prior to this operation')
6667 return None
6668 self._TKCanvas2.move('all', shift_amount[0], shift_amount[1])
6669
6670 def move_figure(self, figure, x_direction, y_direction):
6671 """

Callers 2

move_figureMethod · 0.45
relocate_figureMethod · 0.45

Calls 1

Tested by

no test coverage detected