Enum minifb::Scale[][src]

pub enum Scale {
    FitScreen,
    X1,
    X2,
    X4,
    X8,
    X16,
    X32,
}
Expand description

Scale will scale the frame buffer and the window that is being sent in when calling the update function. This is useful if you for example want to display a 320 x 256 window on a screen with much higher resolution which would result in that the window is very small.

Variants

FitScreen

This mode checks your current screen resolution and will caluclate the largest window size that can be used within that limit and resize it. Useful if you have a small buffer to display on a high resolution screen.

X1

1X scale (which means leave the corrdinates sent into Window::new untouched)

X2

2X window scale (Example: 320 x 200 -> 640 x 400)

X4

4X window scale (Example: 320 x 200 -> 1280 x 800)

X8

8X window scale (Example: 320 x 200 -> 2560 x 1600)

X16

16X window scale (Example: 320 x 200 -> 5120 x 3200)

X32

32 window scale (Example: 320 x 200 -> 10240 x 6400)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.