Module coordinates

Module coordinates 

Source
Expand description

Coordinate types for window positioning and sizing.

This module provides coordinates::Position and coordinates::Size types for working with window coordinates. All values are in logical pixels, which may differ from physical pixels on high-DPI displays.

§Example

use app_window::coordinates::{Position, Size};

let pos = Position::new(100.0, 200.0);
assert_eq!(pos.x(), 100.0);
assert_eq!(pos.y(), 200.0);

let size = Size::new(800.0, 600.0);
assert_eq!(size.width(), 800.0);
assert_eq!(size.height(), 600.0);

Structs§

Position
A position type.
Size
A size type.