CoordinateTransformer

Trait CoordinateTransformer 

Source
pub trait CoordinateTransformer {
    // Required methods
    fn client_to_screen(&self, point: Point) -> WindowsUtilsResult<Point>;
    fn screen_to_client(&self, point: Point) -> WindowsUtilsResult<Point>;
    fn client_rect(&self) -> Rect;
    fn window_rect(&self) -> Rect;
    fn is_point_in_client(&self, point: Point) -> bool;
}
Expand description

Trait for coordinate transformation between client and screen spaces.

Required Methods§

Source

fn client_to_screen(&self, point: Point) -> WindowsUtilsResult<Point>

Converts client coordinates to screen coordinates.

Source

fn screen_to_client(&self, point: Point) -> WindowsUtilsResult<Point>

Converts screen coordinates to client coordinates.

Source

fn client_rect(&self) -> Rect

Returns the client area rectangle.

Source

fn window_rect(&self) -> Rect

Returns the window rectangle.

Source

fn is_point_in_client(&self, point: Point) -> bool

Checks if a point is within the client area.

Implementors§