|
|
@ -35,7 +35,10 @@ pub enum SVGUnit {
|
|
|
|
impl Display for SVGUnit {
|
|
|
|
impl Display for SVGUnit {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
use SVGUnit::*;
|
|
|
|
use SVGUnit::*;
|
|
|
|
write!(f, "{}", match &self {
|
|
|
|
write!(
|
|
|
|
|
|
|
|
f,
|
|
|
|
|
|
|
|
"{}",
|
|
|
|
|
|
|
|
match &self {
|
|
|
|
Pixel => "px",
|
|
|
|
Pixel => "px",
|
|
|
|
Inch => "in",
|
|
|
|
Inch => "in",
|
|
|
|
Centimeter => "cm",
|
|
|
|
Centimeter => "cm",
|
|
|
@ -50,6 +53,7 @@ impl Display for SVGUnit {
|
|
|
|
ViewportHeight => "vh",
|
|
|
|
ViewportHeight => "vh",
|
|
|
|
ViewportMinimum => "vmin",
|
|
|
|
ViewportMinimum => "vmin",
|
|
|
|
ViewportMaximum => "vmax",
|
|
|
|
ViewportMaximum => "vmax",
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|