pub enum EdgeMode {
Clamp = 0,
Wrap = 1,
Reflect = 2,
Reflect101 = 3,
Constant = 4,
}
Expand description
Declares an edge handling mode
Variants§
Clamp = 0
If kernel goes out of bounds it will be clipped to an edge and edge pixel replicated across filter
Wrap = 1
If kernel goes out of bounds it will be clipped, this is a slightly faster than clamp, however have different visual effects at the edge.
Reflect = 2
If filter goes out of bounds image will be replicated with rule fedcba|abcdefgh|hgfedcb
.
Reflect101 = 3
If filter goes out of bounds image will be replicated with rule gfedcb|abcdefgh|gfedcba
.
Constant = 4
If filter goes out of bounds image will be replicated with provided constant. Works only for filter APIs.
Trait Implementations§
Source§impl Ord for EdgeMode
impl Ord for EdgeMode
Source§impl PartialOrd for EdgeMode
impl PartialOrd for EdgeMode
impl Copy for EdgeMode
impl Eq for EdgeMode
impl StructuralPartialEq for EdgeMode
Auto Trait Implementations§
impl Freeze for EdgeMode
impl RefUnwindSafe for EdgeMode
impl Send for EdgeMode
impl Sync for EdgeMode
impl Unpin for EdgeMode
impl UnwindSafe for EdgeMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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