pub enum ScreenScaling {
None,
Stretch,
ShowAll,
ShowAllPixelPerfect,
Crop,
CropPixelPerfect,
Resize,
}
Defines the different ways that a game's screen can be scaled.
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.
The screen will be stretched to fill the window, without trying to preserve the original
aspect ratio. Distortion/stretching/squashing may occur.
The entire screen will be displayed as large as possible while maintaining the original
aspect ratio. Letterboxing may occur.
Works the same as ShowAll, but will only scale by integer values.
The screen will fill the entire window, maintaining the original aspect ratio but
potentially being cropped.
Works the same as Crop, but will only scale by integer values.
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.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Tests if Self
the same as the type T
Read more
impl<SS, SP> SupersetOf for SP where SS: SubsetOf<SP>, | |
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.
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
.