pub struct SourceRegion {
pub x: u32,
pub y: u32,
pub width: u32,
pub height: u32,
}Expand description
Region of the source image to use for resizing.
When set on a ResizeConfig, only the specified rectangle is read from the
input. The streaming API still accepts full-width input rows; the resizer
extracts the region internally. Rows outside the vertical range are skipped.
§Example
use zenresize::SourceRegion;
// Extract a 400×300 region starting at (100, 50)
let region = SourceRegion { x: 100, y: 50, width: 400, height: 300 };Fields§
§x: u32Left edge in pixels.
y: u32Top edge in pixels.
width: u32Width of the region in pixels.
height: u32Height of the region in pixels.
Trait Implementations§
Source§impl Clone for SourceRegion
impl Clone for SourceRegion
Source§fn clone(&self) -> SourceRegion
fn clone(&self) -> SourceRegion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceRegion
impl Debug for SourceRegion
Source§impl PartialEq for SourceRegion
impl PartialEq for SourceRegion
impl Eq for SourceRegion
impl StructuralPartialEq for SourceRegion
Auto Trait Implementations§
impl Freeze for SourceRegion
impl RefUnwindSafe for SourceRegion
impl Send for SourceRegion
impl Sync for SourceRegion
impl Unpin for SourceRegion
impl UnsafeUnpin for SourceRegion
impl UnwindSafe for SourceRegion
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