Enum i_slint_core::items::ImageFit
source · #[repr(u32)]pub enum ImageFit {
Fill = 0,
Contain = 1,
Cover = 2,
}Expand description
This enum defines how the source image shall fit into an Image element.
Variants§
Fill = 0
Scales and stretches the source image to fit the width and height of the Image element.
Contain = 1
The source image is scaled to fit into the Image element’s dimension while preserving the aspect ratio.
Cover = 2
The source image is scaled to cover into the Image element’s dimension while preserving the aspect ratio. If the aspect ratio of the source image doesn’t match the element’s one, then the image will be clipped to fit.
Trait Implementations§
source§impl PartialEq for ImageFit
impl PartialEq for ImageFit
impl Copy for ImageFit
impl Eq for ImageFit
impl StructuralEq for ImageFit
impl StructuralPartialEq for ImageFit
Auto Trait Implementations§
impl RefUnwindSafe for ImageFit
impl Send for ImageFit
impl Sync for ImageFit
impl Unpin 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