Skip to main content

PhysicalPos

Type Alias PhysicalPos 

Source
pub type PhysicalPos = Pos<u32>;
Expand description

Physical (pixel) position relative to the window’s top-left corner.

Using ixy::Pos<u32> rather than the cell-grid Pos (ixy::Pos<u16>) makes the distinction type-safe: you cannot accidentally pass a pixel coordinate where a cell coordinate is expected.

Aliased Type§

#[repr(C)]
pub struct PhysicalPos { pub x: u32, pub y: u32, }

Fields§

§x: u32

The x-coordinate, or horizontal position from the origin.

(x increases →)
+---------→ x
|
|
↓
y
§y: u32

The y-coordinate, or vertical position from the origin.

(y increases ↓)
+---------→ x
|
|
↓
y