[−][src]Enum minifb::ScaleMode
On some OS (X11 for example) it's possible a window can resize even if no resize has been set. This causes some issues depending on how the content of an input buffer should be displayed then it's possible to set this scaling mode to get a better behavior.
Variants
Stretch the buffer in the whole window meaning if your buffer is 256x256 and window is 1024x1024 it will be scaled up 4 times
Keep the correct aspect ratio to be displayed while scaling up fully in the other axis. Fill area will be filed with Window::set_bg_color (default 0, 0, 0)
Places the buffer in the middle of the window without any scaling. Fills the borders with color set Window::set_background_color
(default 0, 0, 0)
If the window is smaller than the buffer the center of the buffer will be displayed
Same as Center but places the buffer in the upper left corner of the window.
Trait Implementations
impl Clone for ScaleMode
[src]
impl Copy for ScaleMode
[src]
impl Debug for ScaleMode
[src]
impl PartialEq<ScaleMode> for ScaleMode
[src]
impl StructuralPartialEq for ScaleMode
[src]
Auto Trait Implementations
impl RefUnwindSafe for ScaleMode
impl Send for ScaleMode
impl Sync for ScaleMode
impl Unpin for ScaleMode
impl UnwindSafe for ScaleMode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,