Enum piet_common::ScaleMode
source · pub enum ScaleMode {
Fit,
Fill,
}Expand description
Mappings from the unit square into a non-square rectangle.
Variants
Fit
The unit 1.0 is mapped to the smaller of width & height, but the mapped item may not cover the entire rectangle.
Fill
The unit 1.0 is mapped to the larger of width & height; some values on the other axis may extend outside the target rectangle.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ScaleMode
impl Send for ScaleMode
impl Sync for ScaleMode
impl Unpin for ScaleMode
impl UnwindSafe for ScaleMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.