pub struct RegionDiff {
pub masked_px: u64,
pub changed_px: u64,
pub changed_pct: f64,
pub mean_delta: f64,
}Expand description
How much of one region changed.
Fields§
§masked_px: u64Pixels the shape covers. Reported so the denominator below is inspectable rather than implied.
changed_px: u64§changed_pct: f64changed_px / masked_px * 100.
Masked pixels, not the crop’s area: a circle crop is roughly a
fifth transparent, and dividing by area would make one
--tolerance mean a different thing for every shape kind.
mean_delta: f64Mean absolute channel difference over the pixels that changed;
exactly 0.0 when none did.
Trait Implementations§
Source§impl Clone for RegionDiff
impl Clone for RegionDiff
Source§fn clone(&self) -> RegionDiff
fn clone(&self) -> RegionDiff
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RegionDiff
Source§impl Debug for RegionDiff
impl Debug for RegionDiff
Source§impl PartialEq for RegionDiff
impl PartialEq for RegionDiff
Source§impl Serialize for RegionDiff
impl Serialize for RegionDiff
impl StructuralPartialEq for RegionDiff
Auto Trait Implementations§
impl Freeze for RegionDiff
impl RefUnwindSafe for RegionDiff
impl Send for RegionDiff
impl Sync for RegionDiff
impl Unpin for RegionDiff
impl UnsafeUnpin for RegionDiff
impl UnwindSafe for RegionDiff
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