Struct winit::dpi::PhysicalSize[][src]

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
[src]

Trait Implementations

impl Debug for PhysicalSize
[src]

Formats the value using the given formatter. Read more

impl Copy for PhysicalSize
[src]

impl Clone for PhysicalSize
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for PhysicalSize
[src]

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

This method tests for !=.

impl From<(f64, f64)> for PhysicalSize
[src]

Performs the conversion.

impl From<(u32, u32)> for PhysicalSize
[src]

Performs the conversion.

impl Into<(f64, f64)> for PhysicalSize
[src]

Performs the conversion.

impl Into<(u32, u32)> for PhysicalSize
[src]

Note that this rounds instead of truncating.

Auto Trait Implementations