Fit
pub enum Fit { Bounds = 1, Cover = 2, Crop = 3,}The fit parameter controls how the image will be constrained within the provided size (width and height) values, in order to maintain the correct proportions.
Variants
= 1
Resize the image to fit entirely within the specified region, making one dimension smaller if needed.
= 2
Resize the image to entirely cover the specified region, making one dimension larger if needed.
Trait implementations
impl Clone for Fit
impl Debug for Fit
impl Serialize for Fit
serialize
View sourcewhere __S: Serializer,Parameters
- self: &Self
- __serializer: __S
Returns
_serde::__private228::Result<__S::Ok, __S::Error>