cursive_image/sizing.rs
1//
2// Sizing
3//
4
5/// Image sizing.
6///
7/// The default is [Fit](Self::Fit).
8#[derive(Clone, Copy, Debug, Default, PartialEq)]
9pub enum Sizing {
10 /// Fit.
11 #[default]
12 Fit,
13
14 /// Scale.
15 Scale(f64),
16}
17
18impl Sizing {
19 /// Keep the original size: [Scale](Self::Scale)(1.).
20 pub fn original() -> Self {
21 Self::Scale(1.)
22 }
23}