Enum usvg::FitTo[][src]

pub enum FitTo {
    Original,
    Width(u32),
    Height(u32),
    Zoom(f32),
}

Image fit options.

Variants

Original

Keep original size.

Width(u32)

Scale to width.

Height(u32)

Scale to height.

Zoom(f32)

Zoom by factor.

Implementations

impl FitTo[src]

pub fn fit_to(&self, size: ScreenSize) -> Option<ScreenSize>[src]

Returns size preprocessed according to FitTo.

Trait Implementations

impl Clone for FitTo[src]

impl Copy for FitTo[src]

impl Debug for FitTo[src]

impl PartialEq<FitTo> for FitTo[src]

impl StructuralPartialEq for FitTo[src]

Auto Trait Implementations

impl RefUnwindSafe for FitTo

impl Send for FitTo

impl Sync for FitTo

impl Unpin for FitTo

impl UnwindSafe for FitTo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.