pub enum ViewportStrategy {
FitIntegerScaling(UVec2),
FitFloatScaling(UVec2),
MatchPhysicalSize,
}
Variants§
FitIntegerScaling(UVec2)
Tries to set the viewport to fit the virtual surface size within the physical surface size. Depending on resolution, it can cause black borders, both vertically and horizontally. Always keeps the aspect ratio, and is “pixel perfect”
FitFloatScaling(UVec2)
Tries to set the viewport to fit the virtual surface size within the physical surface size. Depending on resolution, it can cause “black borders”, either vertically and horizontally. Always keeps the aspect ratio, but might not be pixel perfect
MatchPhysicalSize
The viewport will be the same as the physical size.
Trait Implementations§
Source§impl Debug for ViewportStrategy
impl Debug for ViewportStrategy
Source§impl PartialEq for ViewportStrategy
impl PartialEq for ViewportStrategy
impl Eq for ViewportStrategy
impl StructuralPartialEq for ViewportStrategy
Auto Trait Implementations§
impl Freeze for ViewportStrategy
impl RefUnwindSafe for ViewportStrategy
impl Send for ViewportStrategy
impl Sync for ViewportStrategy
impl Unpin for ViewportStrategy
impl UnwindSafe for ViewportStrategy
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