CoordinatesUi¶
- class CoordinatesUi(from_ui: BaseUi, point_one: Point | RelativelyPoint, point_two: Point | RelativelyPoint)[source]¶
Bases:
BaseUiRepresent a UI region defined by two points inside another UI context.
- point_to_global(coordinates: Point | RelativelyPoint) Point[source]¶
- point_to_global(coordinates: Point) Point
- point_to_global(coordinates: RelativelyPoint) Point
Convert region coordinates to the global screen space.
- Parameters:
coordinates (Point | RelativelyPoint) – Local or relative coordinates to convert.
- Returns:
Converted global point.
- Return type:
- point_to_local(coordinates: Point) Point[source]¶
Convert global coordinates to the local region space.
- get_screenshot() ndarray[source]¶
Capture a screenshot cropped to the nested region.
- Returns:
Screenshot data for the nested region.
- Return type:
numpy.ndarray
- property window: Window¶
Return the parent window for the nested region.
- Returns:
Underlying parent window.
- Return type:
Window