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

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

A position represented in logical 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 LogicalPosition

Trait Implementations

impl From<(f64, f64)> for LogicalPosition

Performs the conversion.

impl From<(i32, i32)> for LogicalPosition

Performs the conversion.

impl Into<(i32, i32)> for LogicalPosition

Note that this rounds instead of truncating.

impl Into<(f64, f64)> for LogicalPosition

Performs the conversion.

impl Clone for LogicalPosition

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for LogicalPosition

Formats the value using the given formatter. Read more

impl Copy for LogicalPosition

impl PartialEq<LogicalPosition> for LogicalPosition

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

This method tests for !=.

Auto Trait Implementations