Struct winit::dpi::LogicalSize[][src]

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

Trait Implementations

impl Debug for LogicalSize
[src]

Formats the value using the given formatter. Read more

impl Copy for LogicalSize
[src]

impl Clone for LogicalSize
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for LogicalSize
[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 LogicalSize
[src]

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Note that this rounds instead of truncating.

Auto Trait Implementations

impl Send for LogicalSize

impl Sync for LogicalSize