Struct nannou::ui::backend::glium::glium::backend::glutin::glutin::dpi::PhysicalPosition[]

pub struct PhysicalPosition {
    pub x: f64,
    pub y: f64,
}

A position represented in physical pixels.

The position is stored as floats, so please be careful. Casting floats to integers truncates the fractional part, which can cause noticable issues. To help with that, an Into<(i32, i32)> implementation is provided which does the rounding for you.

Fields

Methods

impl PhysicalPosition

Trait Implementations

impl From<(i32, i32)> for PhysicalPosition

Performs the conversion.

impl From<(f64, f64)> for PhysicalPosition

Performs the conversion.

impl Into<(i32, i32)> for PhysicalPosition

Note that this rounds instead of truncating.

impl Into<(f64, f64)> for PhysicalPosition

Performs the conversion.

impl Clone for PhysicalPosition

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for PhysicalPosition

Formats the value using the given formatter. Read more

impl Copy for PhysicalPosition

impl PartialEq<PhysicalPosition> for PhysicalPosition

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations