WindowUi

class WindowUi(window: Window)[source]

Bases: BaseUi

Represent a window as a UI context.

point_to_global(coordinates: Point | RelativelyPoint) Point[source]
point_to_global(coordinates: Point)
point_to_global(coordinates: RelativelyPoint)

Convert window coordinates to the global screen space.

Parameters:

coordinates (Point | RelativelyPoint) – Local or relative coordinates to convert.

Returns:

Converted global point.

Return type:

Point

point_to_local(coordinates: Point) Point[source]

Convert global coordinates to the window local space.

Parameters:

coordinates (Point) – Global point to convert.

Returns:

Converted local point.

Return type:

Point

get_screenshot() ndarray[source]

Capture a screenshot of the window.

Returns:

Window screenshot data.

Return type:

numpy.ndarray

property window

Return the wrapped window instance.

Returns:

Wrapped window.

Return type:

Window