#[non_exhaustive]#[repr(i32)]pub enum Stretch {
None = 0,
Fill = 1,
Uniform = 2,
UniformToFill = 3,
}Expand description
Noesis::Stretch: how content is resized to fill its
allocated space. Ordinals match the C++ enum.
This is the crate’s single Stretch type, used both by tile brushes here
and by shapes, which re-exports it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None = 0
Preserve original size.
Fill = 1
Resize to fill, ignoring aspect ratio.
Uniform = 2
Resize to fit while preserving aspect ratio.
UniformToFill = 3
Resize to fill while preserving aspect ratio (clips overflow).
Trait Implementations§
impl Copy for Stretch
impl Eq for Stretch
impl StructuralPartialEq for Stretch
Auto Trait Implementations§
impl Freeze for Stretch
impl RefUnwindSafe for Stretch
impl Send for Stretch
impl Sync for Stretch
impl Unpin for Stretch
impl UnsafeUnpin for Stretch
impl UnwindSafe for Stretch
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