pub struct CropRect {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
}Expand description
A crop rectangle, normalized to [0, 1] of the source frame:
(x, y) is the top-left corner, (width, height) the extent. The
full frame is { x: 0, y: 0, width: 1, height: 1 }.
Fields§
§x: f32Left edge, 0.0..=1.0.
y: f32Top edge, 0.0..=1.0.
width: f32Width, 0.0..=1.0.
height: f32Height, 0.0..=1.0.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CropRect
impl<'de> Deserialize<'de> for CropRect
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for CropRect
impl StructuralPartialEq for CropRect
Auto Trait Implementations§
impl Freeze for CropRect
impl RefUnwindSafe for CropRect
impl Send for CropRect
impl Sync for CropRect
impl Unpin for CropRect
impl UnsafeUnpin for CropRect
impl UnwindSafe for CropRect
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