[][src]Enum druid::widget::FillStrat

pub enum FillStrat {
    Contain,
    Cover,
    Fill,
    FitHeight,
    FitWidth,
    None,
    ScaleDown,
}

Strategies for inscribing a rectangle inside another rectangle.

Variants

Contain

As large as posible without changing aspect ratio of image and all of image shown

Cover

As large as posible with no dead space so that some of the image may be clipped

Fill

Fill the widget with no dead space, aspect ratio of widget is used

FitHeight

Fill the hight with the images aspect ratio, some of the image may be clipped

FitWidth

Fill the width with the images aspect ratio, some of the image may be clipped

None

Do not scale

ScaleDown

Scale down to fit but do not scale up

Implementations

impl FillStrat[src]

pub fn affine_to_fill(self, parent: Size, fit_box: Size) -> Affine[src]

Calculate an origin and scale for an image with a given FillStrat.

This takes some properties of a widget and a fill strategy and returns an affine matrix used to position and scale the image in the widget.

Trait Implementations

impl Clone for FillStrat[src]

impl Copy for FillStrat[src]

impl Default for FillStrat[src]

impl PartialEq<FillStrat> for FillStrat[src]

impl StructuralPartialEq for FillStrat[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> AnyEq for T where
    T: PartialEq<T> + Any
[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> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

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.