Enum tetra::graphics::scaling::ScalingMode
source · #[non_exhaustive]
pub enum ScalingMode {
Fixed,
Stretch,
ShowAll,
ShowAllPixelPerfect,
Crop,
CropPixelPerfect,
}
Expand description
Algorithms that can be used to scale the game’s screen.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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§
source§impl Clone for ScalingMode
impl Clone for ScalingMode
source§fn clone(&self) -> ScalingMode
fn clone(&self) -> ScalingMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ScalingMode
impl Debug for ScalingMode
source§impl PartialEq<ScalingMode> for ScalingMode
impl PartialEq<ScalingMode> for ScalingMode
source§fn eq(&self, other: &ScalingMode) -> bool
fn eq(&self, other: &ScalingMode) -> bool
self
and other
values to be equal, and is used
by ==
.