Struct piston_window::prelude::window::Position
source · pub struct Position {
pub x: i32,
pub y: i32,
}
Expand description
Structure to store the window position.
The width and height are in points. On most computers, a point is 1:1 with a pixel. However, this is not universally true. For example, the Apple Retina Display defines 1 point to be a 2x2 square of pixels.
Normally, the consideration of points vs pixels should be left to the host operating system.
Fields§
§x: i32
The x coordinate.
y: i32
The y coordinate.
Trait Implementations§
source§impl PartialEq for Position
impl PartialEq for Position
impl Copy for Position
impl Eq for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more