MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / translate

Method translate

pydevd_attach_to_process/winappdbg/win32/user32.py:621–639  ·  view source on GitHub ↗

Translate coordinates from one window to another. @see: L{client_to_screen}, L{screen_to_client} @type hWndFrom: int or L{HWND} or L{system.Window} @param hWndFrom: Window handle to translate from. Use C{HWND_DESKTOP} for screen coordinates. @

(self, hWndFrom=HWND_DESKTOP, hWndTo=HWND_DESKTOP)

Source from the content-addressed store, hash-verified

619 return Rect(topleft.x, topleft.y, bottomright.x, bottomright.y)
620
621 def translate(self, hWndFrom=HWND_DESKTOP, hWndTo=HWND_DESKTOP):
622 """
623 Translate coordinates from one window to another.
624
625 @see: L{client_to_screen}, L{screen_to_client}
626
627 @type hWndFrom: int or L{HWND} or L{system.Window}
628 @param hWndFrom: Window handle to translate from.
629 Use C{HWND_DESKTOP} for screen coordinates.
630
631 @type hWndTo: int or L{HWND} or L{system.Window}
632 @param hWndTo: Window handle to translate to.
633 Use C{HWND_DESKTOP} for screen coordinates.
634
635 @rtype: L{Rect}
636 @return: New object containing the translated coordinates.
637 """
638 points = [(self.left, self.top), (self.right, self.bottom)]
639 return MapWindowPoints(hWndFrom, hWndTo, points)
640
641
642class WindowPlacement(object):

Callers

nothing calls this directly

Calls 1

MapWindowPointsFunction · 0.85

Tested by

no test coverage detected