Enum libnotcurses_sys::NcScale
source · #[non_exhaustive]#[repr(u32)]pub enum NcScale {
None = 0,
Scale = 1,
NoneHiRes = 3,
ScaleHiRes = 4,
Stretch = 2,
}
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 = 0
Maintains the original size. Will Apply no scaling.
Scale = 1
Maintains the aspect ratio.
Scales an NcVisual
to the NcPlane
’s size without stretching.
NoneHiRes = 3
Like None
, maintains the original size, while admitting
high-resolution blitters that don’t preserve the aspect ratio.
ScaleHiRes = 4
Like Scale
, maintains the aspect ratio, while admitting
high-resolution blitters that don’t preserve the aspect ratio.
Stretch = 2
Throws away aspect ratio.
Stretches and scales the NcVisual
in an attempt to fill the entirety
of the NcPlane
.