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

pub struct LogicalSize {
    pub width: f64,
    pub height: f64,
}

A size represented in logical pixels.

The size 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<(u32, u32)> implementation is provided which does the rounding for you.

Fields

Methods

impl LogicalSize

Trait Implementations

impl From<(f64, f64)> for LogicalSize

Performs the conversion.

impl From<(u32, u32)> for LogicalSize

Performs the conversion.

impl Into<(f64, f64)> for LogicalSize

Performs the conversion.

impl Into<(u32, u32)> for LogicalSize

Note that this rounds instead of truncating.

impl Clone for LogicalSize

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for LogicalSize

Formats the value using the given formatter. Read more

impl Copy for LogicalSize

impl PartialEq<LogicalSize> for LogicalSize

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

This method tests for !=.

Auto Trait Implementations

impl Send for LogicalSize

impl Sync for LogicalSize