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

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

A size represented in physical 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 PhysicalSize

Trait Implementations

impl From<(u32, u32)> for PhysicalSize

Performs the conversion.

impl From<(f64, f64)> for PhysicalSize

Performs the conversion.

impl Into<(f64, f64)> for PhysicalSize

Performs the conversion.

impl Into<(u32, u32)> for PhysicalSize

Note that this rounds instead of truncating.

impl Clone for PhysicalSize

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for PhysicalSize

Formats the value using the given formatter. Read more

impl Copy for PhysicalSize

impl PartialEq<PhysicalSize> for PhysicalSize

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

This method tests for !=.

Auto Trait Implementations