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

pub enum ScreenScaling {
    None,
    Stretch,
    ShowAll,
    ShowAllPixelPerfect,
    Crop,
    CropPixelPerfect,
    Resize,
}

Defines the different ways that a game's screen can be scaled.

Variants

None

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.

Resize

The screen will resize to match the size of the window. More of the scene will be shown on bigger windows, and less of the scene will be shown on smaller windows.

If the scaling mode changes, the internal resolution will return to its original value.

Trait Implementations

impl Copy for ScreenScaling[src]

impl PartialEq<ScreenScaling> for ScreenScaling[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for ScreenScaling[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ScreenScaling[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

fn is<T>() -> bool where
    T: Scalar
[src]

Tests if Self the same as the type T Read more

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.