Struct nannou::state::window::Window [] [src]

pub struct Window<S = DefaultScalar> {
    pub id: Option<Id>,
    pub width: S,
    pub height: S,
    pub hidpi_factor: S,
}

State of the window in focus.

Fields

ID of the window currently in focus.

The width of the focused window agnostic of DPI.

This is equal to the pixel width divided by the hidpi_factor.

The height of the focused window agnostic of DPI.

This is equal to the pixel height divided by the hidpi_factor.

The high "dots-per-inch" multiplier that describes the density of the screens pixels.

Methods

impl<S> Window<S> where
    S: BaseFloat
[src]

[src]

Initialise the window state.

[src]

Get the range along the x axis occupied by the window.

[src]

Get the range along the y axis occupied by the window.

[src]

Get the x coordinate for the left edge of the window.

[src]

Expects that there will be a window::Id (the common case) and **panic!**s otherwise.

[src]

Return the width and height as a Vector2.

Trait Implementations

impl<S: Copy> Copy for Window<S>
[src]

impl<S: Clone> Clone for Window<S>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for Window<S>
[src]

[src]

Formats the value using the given formatter. Read more

impl<S: PartialEq> PartialEq for Window<S>
[src]

[src]

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

[src]

This method tests for !=.

Auto Trait Implementations

impl<S> Send for Window<S> where
    S: Send

impl<S> Sync for Window<S> where
    S: Sync