pub enum Scaling {
PreserveAspect,
Integer,
StretchToWindow,
}
Expand description
The scaling strategy. A “VariableAspectRatio” option may be provided in the future.
Variants§
PreserveAspect
Fits the render target to the window while preserving the aspect ratio with black bars. Curenly does not work well with vertical aspect ratios, this will be fixed.
Integer
Same as PreserveAspect, but performs integer scaling for best results with pixel art. Usually increases the amount of black bars around the render target.
StretchToWindow
Stretches the render target to the window, completely disregarding the aspect ratio. The Picture Gods will smite you if you release anything using this.
Trait Implementations§
impl StructuralPartialEq for Scaling
Auto Trait Implementations§
impl Freeze for Scaling
impl RefUnwindSafe for Scaling
impl Send for Scaling
impl Sync for Scaling
impl Unpin for Scaling
impl UnwindSafe for Scaling
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more