pub enum TextureFit {
Contain,
Cover,
Fill,
}Expand description
How a TextureView places its texture in the widget’s box.
Variants§
Contain
Scale (preserving aspect ratio) to fit entirely inside the box, centred; the other axis is letterboxed.
Cover
Scale (preserving aspect ratio) to cover the box entirely, centred; the overflow is clipped to the box.
Fill
Stretch to exactly the box, ignoring aspect ratio.
Trait Implementations§
Source§impl Clone for TextureFit
impl Clone for TextureFit
impl Copy for TextureFit
Source§impl Debug for TextureFit
impl Debug for TextureFit
Source§impl Default for TextureFit
impl Default for TextureFit
impl Eq for TextureFit
Source§impl PartialEq for TextureFit
impl PartialEq for TextureFit
impl StructuralPartialEq for TextureFit
Auto Trait Implementations§
impl Freeze for TextureFit
impl RefUnwindSafe for TextureFit
impl Send for TextureFit
impl Sync for TextureFit
impl Unpin for TextureFit
impl UnsafeUnpin for TextureFit
impl UnwindSafe for TextureFit
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.