pub enum ImageFit {
Fit,
Fill,
Stretch,
None,
}Expand description
How an image should be scaled to fit a bounding rectangle.
Variants§
Fit
Scale to fit within the rect, preserving aspect ratio.
Fill
Scale to cover the rect, clipping overflow.
Stretch
Stretch to fill the rect exactly (may distort).
None
Natural size: 1 pixel = 1 point, no scaling.
Trait Implementations§
impl Copy for ImageFit
impl Eq for ImageFit
impl StructuralPartialEq for ImageFit
Auto Trait Implementations§
impl Freeze for ImageFit
impl RefUnwindSafe for ImageFit
impl Send for ImageFit
impl Sync for ImageFit
impl Unpin for ImageFit
impl UnsafeUnpin for ImageFit
impl UnwindSafe for ImageFit
Blanket Implementations§
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