[−][src]Enum druid::widget::FillStrat
Strategies for inscribing a rectangle inside another rectangle.
Variants
As large as posible without changing aspect ratio of image and all of image shown
As large as posible with no dead space so that some of the image may be clipped
Fill the widget with no dead space, aspect ratio of widget is used
Fill the hight with the images aspect ratio, some of the image may be clipped
Fill the width with the images aspect ratio, some of the image may be clipped
Do not scale
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]
pub fn eq(&self, other: &FillStrat) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for FillStrat
[src]
Auto Trait Implementations
impl RefUnwindSafe for FillStrat
[src]
impl Send for FillStrat
[src]
impl Sync for FillStrat
[src]
impl Unpin for FillStrat
[src]
impl UnwindSafe for FillStrat
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
pub fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,