pub enum PngSizing {
Source,
Dpi(f64),
Scale(f64),
Width(u32),
Height(u32),
}Expand description
Mutually exclusive PNG sizing modes.
Variants§
Source
Preserve the SVG canvas pixel dimensions.
Dpi(f64)
Render at a print-oriented DPI, treating SVG CSS pixels as 96 DPI. Also writes matching DPI metadata to the PNG file.
Scale(f64)
Multiply SVG canvas width and height by this scale factor.
Width(u32)
Set the output width in pixels and preserve aspect ratio.
Height(u32)
Set the output height in pixels and preserve aspect ratio.
Trait Implementations§
impl Copy for PngSizing
impl StructuralPartialEq for PngSizing
Auto Trait Implementations§
impl Forget for PngSizing
impl Freeze for PngSizing
impl Move for PngSizing
impl RefUnwindSafe for PngSizing
impl Send for PngSizing
impl Sync for PngSizing
impl Unpin for PngSizing
impl UnsafeUnpin for PngSizing
impl UnwindSafe for PngSizing
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.