logo
pub enum FullScreen {
    Disabled,
    NoScale,
    ScaleAspectRatioIgnore,
    ScaleAspectRatioPreserve,
    ScaleNearestMultiple,
    Custom {
        value: f32,
    },
}
Expand description

Representing possible full screen modes.

Can be extended with Custom by using concrete project values.

Variants

Disabled

FullScreen mode is not available.

NoScale

Preserves original pixel size.

ScaleAspectRatioIgnore

Scale without preserving aspect ratio - some distortion may occur, including non linear pixel sizes.

ScaleAspectRatioPreserve

Scale without aspect ratio distortion. Non linear pixel sizes may occur.

ScaleNearestMultiple

Scale without distortion, and doubling pixels (2x2, 4x4 etc) to nearest multiple to preserve pixel sizes.

Custom

Fields

value: f32

Scale value

Allows Scale to be extended (e.g. for using project specific scale modes).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.