pub struct CropProperties {
pub angle: Option<f32>,
pub offset_bottom: Option<f32>,
pub offset_left: Option<f32>,
pub offset_right: Option<f32>,
pub offset_top: Option<f32>,
}
Expand description
The crop properties of an image. The crop rectangle is represented using fractional offsets from the original content’s 4 edges. - If the offset is in the interval (0, 1), the corresponding edge of crop rectangle is positioned inside of the image’s original bounding rectangle. - If the offset is negative or greater than 1, the corresponding edge of crop rectangle is positioned outside of the image’s original bounding rectangle. - If all offsets and rotation angle are 0, the image is not cropped.
This type is not used in any activity, and only used as part of another schema.
Fields§
§angle: Option<f32>
The clockwise rotation angle of the crop rectangle around its center, in radians. Rotation is applied after the offsets.
offset_bottom: Option<f32>
The offset specifies how far inwards the bottom edge of the crop rectangle is from the bottom edge of the original content as a fraction of the original content’s height.
offset_left: Option<f32>
The offset specifies how far inwards the left edge of the crop rectangle is from the left edge of the original content as a fraction of the original content’s width.
offset_right: Option<f32>
The offset specifies how far inwards the right edge of the crop rectangle is from the right edge of the original content as a fraction of the original content’s width.
offset_top: Option<f32>
The offset specifies how far inwards the top edge of the crop rectangle is from the top edge of the original content as a fraction of the original content’s height.
Trait Implementations§
Source§impl Clone for CropProperties
impl Clone for CropProperties
Source§fn clone(&self) -> CropProperties
fn clone(&self) -> CropProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CropProperties
impl Debug for CropProperties
Source§impl Default for CropProperties
impl Default for CropProperties
Source§fn default() -> CropProperties
fn default() -> CropProperties
Source§impl<'de> Deserialize<'de> for CropProperties
impl<'de> Deserialize<'de> for CropProperties
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for CropProperties
impl Serialize for CropProperties
impl Part for CropProperties
Auto Trait Implementations§
impl Freeze for CropProperties
impl RefUnwindSafe for CropProperties
impl Send for CropProperties
impl Sync for CropProperties
impl Unpin for CropProperties
impl UnwindSafe for CropProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more