implement h + w
This commit is contained in:
parent
7b12788a92
commit
78e3d6b798
7 changed files with 146 additions and 12 deletions
|
@ -107,6 +107,12 @@ pub enum ScreenValue {
|
|||
_90,
|
||||
px,
|
||||
reverse,
|
||||
min,
|
||||
max,
|
||||
fit,
|
||||
screen,
|
||||
full,
|
||||
auto,
|
||||
}
|
||||
|
||||
impl ScreenValue {
|
||||
|
@ -149,6 +155,74 @@ impl ScreenValue {
|
|||
Self::_90 => "90",
|
||||
Self::px => "px",
|
||||
Self::reverse => "reverse",
|
||||
Self::min => "min",
|
||||
Self::max => "max",
|
||||
Self::fit => "fit",
|
||||
Self::screen => "screen",
|
||||
Self::full => "full",
|
||||
Self::auto => "auto",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub enum Fraction {
|
||||
_1on2,
|
||||
_1on3,
|
||||
_2on3,
|
||||
_1on4,
|
||||
_2on4,
|
||||
_3on4,
|
||||
_1on5,
|
||||
_2on5,
|
||||
_3on5,
|
||||
_4on5,
|
||||
_1on6,
|
||||
_2on6,
|
||||
_3on6,
|
||||
_4on6,
|
||||
_5on6,
|
||||
_1on12,
|
||||
_2on12,
|
||||
_3on12,
|
||||
_4on12,
|
||||
_5on12,
|
||||
_6on12,
|
||||
_7on12,
|
||||
_8on12,
|
||||
_9on12,
|
||||
_10on12,
|
||||
_11on12,
|
||||
}
|
||||
|
||||
impl Fraction {
|
||||
pub const fn to_value(&self) -> &str {
|
||||
match self {
|
||||
Fraction::_1on2 => "1/2",
|
||||
Fraction::_1on3 => "1/3",
|
||||
Fraction::_2on3 => "2/3",
|
||||
Fraction::_1on4 => "1/4",
|
||||
Fraction::_2on4 => "2/4",
|
||||
Fraction::_3on4 => "3/4",
|
||||
Fraction::_1on5 => "1/5",
|
||||
Fraction::_2on5 => "2/5",
|
||||
Fraction::_3on5 => "3/5",
|
||||
Fraction::_4on5 => "4/5",
|
||||
Fraction::_1on6 => "1/6",
|
||||
Fraction::_2on6 => "2/6",
|
||||
Fraction::_3on6 => "3/6",
|
||||
Fraction::_4on6 => "4/6",
|
||||
Fraction::_5on6 => "5/6",
|
||||
Fraction::_1on12 => "1/12",
|
||||
Fraction::_2on12 => "2/12",
|
||||
Fraction::_3on12 => "3/12",
|
||||
Fraction::_4on12 => "4/12",
|
||||
Fraction::_5on12 => "5/12",
|
||||
Fraction::_6on12 => "6/12",
|
||||
Fraction::_7on12 => "7/12",
|
||||
Fraction::_8on12 => "8/12",
|
||||
Fraction::_9on12 => "9/12",
|
||||
Fraction::_10on12 => "10/12",
|
||||
Fraction::_11on12 => "11/12",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue