[][src]Enum minifb::ScaleMode

pub enum 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.



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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,