Skip to content
Discussion options

You must be logged in to vote

Have you tried ScalingMode::Fill on the (unpublished) main branch?

pixels/src/lib.rs

Lines 58 to 66 in 21bae15

/// The scaling mode controls the scaling behavior of [`renderers::ScalingRenderer`].
#[derive(Debug, Copy, Clone)]
pub enum ScalingMode {
/// The buffer is scaled up, if needed, to the nearest integer multiple of the buffer size.
PixelPerfect,
/// Fill the screen while preserving aspect ratio. The renderer effectively scales the buffer
/// to the nearest integer multiple first, then linearly interpolates to fit.
Fill,
}

pixels/src/lib.rs

Lines 308 to 323 in 21bae15

/// Set the scaling mode.
///
/…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kshitijl
Comment options

Answer selected by kshitijl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants