pub enum ImageFit {
Original {
scale: f32,
},
Fraction(Vec2),
Exact(Vec2),
}
Expand description
This type determines how the image should try to fit within the UI.
The final fit will be clamped to ImageSize::max_size
.
Variants§
Original
Fit the image to its original size, scaled by some factor.
Ignores how much space is actually available in the ui.
Fraction(Vec2)
Fit the image to a fraction of the available size.
Exact(Vec2)
Fit the image to an exact size.
Ignores how much space is actually available in the ui.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImageFit
impl<'de> Deserialize<'de> for ImageFit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy 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 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