Enum libnotcurses_sys::NcScale
source · #[repr(u32)]
#[non_exhaustive]
pub enum NcScale {
None,
Scale,
NoneHiRes,
ScaleHiRes,
Stretch,
}
Expand description
Indicates how to scale an NcVisual
during rendering.
Default
Application
The scaling preferences are applied only for the context of
NcVisual.render
.
You can think of it as the following pipeline, where you still have the original frame:
NcVisual::from_file() → frame → NcVisual.render() → scaling → output_frame → blit
Whereas
NcVisual.resize
and
NcVisual.resize_noninterpolative
are changing that original frame.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Maintains the original size. Will Apply no scaling.
Scale
Maintains the aspect ratio.
Scales an NcVisual
to the NcPlane
’s size without stretching.
NoneHiRes
Like None
, maintains the original size, while admitting
high-resolution blitters that don’t preserve the aspect ratio.
ScaleHiRes
Like Scale
, maintains the aspect ratio, while admitting
high-resolution blitters that don’t preserve the aspect ratio.
Stretch
Throws away aspect ratio.
Stretches and scales the NcVisual
in an attempt to fill the entirety
of the NcPlane
.