[][src]Enum tetra::graphics::scaling::ScalingMode

pub enum ScalingMode {
    Fixed,
    Stretch,
    ShowAll,
    ShowAllPixelPerfect,
    Crop,
    CropPixelPerfect,
}

Algorithms that can be used to scale the game's screen.

Variants

Fixed

The game will always be displayed at its native resolution, with no scaling applied. If the window is bigger than the native resolution, letterboxing will be applied. If the window is smaller than the native resolution, it will be cropped.

Stretch

The screen will be stretched to fill the window, without trying to preserve the original aspect ratio. Distortion/stretching/squashing may occur.

ShowAll

The entire screen will be displayed as large as possible while maintaining the original aspect ratio. Letterboxing may occur.

ShowAllPixelPerfect

Works the same as ShowAll, but will only scale by integer values.

Crop

The screen will fill the entire window, maintaining the original aspect ratio but potentially being cropped.

CropPixelPerfect

Works the same as Crop, but will only scale by integer values.

Trait Implementations

impl Clone for ScalingMode[src]

impl Copy for ScalingMode[src]

impl Debug for ScalingMode[src]

impl PartialEq<ScalingMode> for ScalingMode[src]

impl StructuralPartialEq for ScalingMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,