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§
source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.