Struct image2::Pixel [−][src]
pub struct Pixel<C: Color>(_, _);
Expand description
Normalized image data
Implementations
impl<C: Color> Pixel<C>
[src]
impl<C: Color> Pixel<C>
[src]pub fn is_alpha(&self, index: Channel) -> bool
[src]
pub fn is_alpha(&self, index: Channel) -> bool
[src]Returns true when the provided channel index matches the alpha channel index
pub fn with_alpha(&mut self, value: f64) -> &mut Self
[src]
pub fn with_alpha(&mut self, value: f64) -> &mut Self
[src]Set alpha value
pub fn convert_to<D: Color>(&self, dest: &mut Pixel<D>)
[src]
pub fn convert_to<D: Color>(&self, dest: &mut Pixel<D>)
[src]Convert pixel color type to an existing pixel
pub fn copy_from_slice<T: Type>(&mut self, data: impl AsRef<[T]>) -> &mut Self
[src]
pub fn copy_from_slice<T: Type>(&mut self, data: impl AsRef<[T]>) -> &mut Self
[src]Copy values from an existing slice
pub fn copy_from_data<T: Type>(&mut self, data: &Data<'_, T, C>) -> &mut Self
[src]
pub fn copy_from_data<T: Type>(&mut self, data: &Data<'_, T, C>) -> &mut Self
[src]Copy values from an existing slice
pub fn convert_from_data<T: Type, D: Color>(&mut self, data: &Data<'_, T, D>)
[src]
pub fn convert_from_data<T: Type, D: Color>(&mut self, data: &Data<'_, T, D>)
[src]Convert color and copy to slice
pub fn convert_to_data<T: Type, D: Color>(&self, data: &mut DataMut<'_, T, D>)
[src]
pub fn convert_to_data<T: Type, D: Color>(&self, data: &mut DataMut<'_, T, D>)
[src]Convert color and copy to slice
pub fn blend_alpha(&mut self) -> &mut Self
[src]
pub fn blend_alpha(&mut self) -> &mut Self
[src]Blend alpha value
pub fn map(&mut self, f: impl Fn(f64) -> f64) -> &mut Self
[src]
pub fn map(&mut self, f: impl Fn(f64) -> f64) -> &mut Self
[src]Create a new pixel by applying f
over an existing pixel
pub fn map2(
&mut self,
other: &Pixel<C>,
f: impl Fn(f64, f64) -> f64
) -> &mut Self
[src]
pub fn map2(
&mut self,
other: &Pixel<C>,
f: impl Fn(f64, f64) -> f64
) -> &mut Self
[src]Zip two pixels, apply f
and return a new pixel with the results
pub fn iter(&self) -> impl Iterator<Item = &f64>
[src]
pub fn iter(&self) -> impl Iterator<Item = &f64>
[src]Get iterator over pixel data, ignoring alpha channel
Trait Implementations
impl<'a, C: Color> AddAssign<&'a Pixel<C>> for Pixel<C>
[src]
impl<'a, C: Color> AddAssign<&'a Pixel<C>> for Pixel<C>
[src]fn add_assign(&mut self, other: &'a Pixel<C>)
[src]
fn add_assign(&mut self, other: &'a Pixel<C>)
[src]Performs the +=
operation. Read more
impl<C: Color> AddAssign<Pixel<C>> for Pixel<C>
[src]
impl<C: Color> AddAssign<Pixel<C>> for Pixel<C>
[src]fn add_assign(&mut self, other: Pixel<C>)
[src]
fn add_assign(&mut self, other: Pixel<C>)
[src]Performs the +=
operation. Read more
impl<T: Type, C: Color> AddAssign<T> for Pixel<C>
[src]
impl<T: Type, C: Color> AddAssign<T> for Pixel<C>
[src]fn add_assign(&mut self, other: T)
[src]
fn add_assign(&mut self, other: T)
[src]Performs the +=
operation. Read more
impl<'a, C: Color> DivAssign<&'a Pixel<C>> for Pixel<C>
[src]
impl<'a, C: Color> DivAssign<&'a Pixel<C>> for Pixel<C>
[src]fn div_assign(&mut self, other: &'a Pixel<C>)
[src]
fn div_assign(&mut self, other: &'a Pixel<C>)
[src]Performs the /=
operation. Read more
impl<C: Color> DivAssign<Pixel<C>> for Pixel<C>
[src]
impl<C: Color> DivAssign<Pixel<C>> for Pixel<C>
[src]fn div_assign(&mut self, other: Pixel<C>)
[src]
fn div_assign(&mut self, other: Pixel<C>)
[src]Performs the /=
operation. Read more
impl<T: Type, C: Color> DivAssign<T> for Pixel<C>
[src]
impl<T: Type, C: Color> DivAssign<T> for Pixel<C>
[src]fn div_assign(&mut self, other: T)
[src]
fn div_assign(&mut self, other: T)
[src]Performs the /=
operation. Read more
impl<T: Type, C: Color> FromIterator<T> for Pixel<C>
[src]
impl<T: Type, C: Color> FromIterator<T> for Pixel<C>
[src]fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl<C: Color> IntoIterator for Pixel<C>
[src]
impl<C: Color> IntoIterator for Pixel<C>
[src]impl<'a, C: Color> MulAssign<&'a Pixel<C>> for Pixel<C>
[src]
impl<'a, C: Color> MulAssign<&'a Pixel<C>> for Pixel<C>
[src]fn mul_assign(&mut self, other: &'a Pixel<C>)
[src]
fn mul_assign(&mut self, other: &'a Pixel<C>)
[src]Performs the *=
operation. Read more
impl<C: Color> MulAssign<Pixel<C>> for Pixel<C>
[src]
impl<C: Color> MulAssign<Pixel<C>> for Pixel<C>
[src]fn mul_assign(&mut self, other: Pixel<C>)
[src]
fn mul_assign(&mut self, other: Pixel<C>)
[src]Performs the *=
operation. Read more
impl<T: Type, C: Color> MulAssign<T> for Pixel<C>
[src]
impl<T: Type, C: Color> MulAssign<T> for Pixel<C>
[src]fn mul_assign(&mut self, other: T)
[src]
fn mul_assign(&mut self, other: T)
[src]Performs the *=
operation. Read more
impl<C: PartialOrd + Color> PartialOrd<Pixel<C>> for Pixel<C>
[src]
impl<C: PartialOrd + Color> PartialOrd<Pixel<C>> for Pixel<C>
[src]fn partial_cmp(&self, other: &Pixel<C>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Pixel<C>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, C: Color> RemAssign<&'a Pixel<C>> for Pixel<C>
[src]
impl<'a, C: Color> RemAssign<&'a Pixel<C>> for Pixel<C>
[src]fn rem_assign(&mut self, other: &'a Pixel<C>)
[src]
fn rem_assign(&mut self, other: &'a Pixel<C>)
[src]Performs the %=
operation. Read more
impl<C: Color> RemAssign<Pixel<C>> for Pixel<C>
[src]
impl<C: Color> RemAssign<Pixel<C>> for Pixel<C>
[src]fn rem_assign(&mut self, other: Pixel<C>)
[src]
fn rem_assign(&mut self, other: Pixel<C>)
[src]Performs the %=
operation. Read more
impl<T: Type, C: Color> RemAssign<T> for Pixel<C>
[src]
impl<T: Type, C: Color> RemAssign<T> for Pixel<C>
[src]fn rem_assign(&mut self, other: T)
[src]
fn rem_assign(&mut self, other: T)
[src]Performs the %=
operation. Read more
impl<'a, C: Color> SubAssign<&'a Pixel<C>> for Pixel<C>
[src]
impl<'a, C: Color> SubAssign<&'a Pixel<C>> for Pixel<C>
[src]fn sub_assign(&mut self, other: &'a Pixel<C>)
[src]
fn sub_assign(&mut self, other: &'a Pixel<C>)
[src]Performs the -=
operation. Read more
impl<C: Color> SubAssign<Pixel<C>> for Pixel<C>
[src]
impl<C: Color> SubAssign<Pixel<C>> for Pixel<C>
[src]fn sub_assign(&mut self, other: Pixel<C>)
[src]
fn sub_assign(&mut self, other: Pixel<C>)
[src]Performs the -=
operation. Read more
impl<T: Type, C: Color> SubAssign<T> for Pixel<C>
[src]
impl<T: Type, C: Color> SubAssign<T> for Pixel<C>
[src]fn sub_assign(&mut self, other: T)
[src]
fn sub_assign(&mut self, other: T)
[src]Performs the -=
operation. Read more
impl<C: Color> StructuralPartialEq for Pixel<C>
[src]
Auto Trait Implementations
impl<C> RefUnwindSafe for Pixel<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> Send for Pixel<C>
impl<C> Sync for Pixel<C>
impl<C> Unpin for Pixel<C>
impl<C> UnwindSafe for Pixel<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
[src]
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,