[−][src]Struct image2::PixelVec
PixelVec is a 4-channel pixel backed by a static array
Methods
impl<T: Type> PixelVec<T>
[src]
pub fn empty() -> PixelVec<T>
[src]
Create a new PixelVec, each channel set to 0
pub fn new(a: T, b: T, c: T, d: T) -> PixelVec<T>
[src]
Create a new PixelVec with the given values
pub fn new_gray(a: T) -> PixelVec<T>
[src]
Create a new PixelBec with every channel set to the given value. The alpha channel is set
to T::max()
pub fn from_pixel<P: AsRef<[T]>>(pixel: P) -> PixelVec<T>
[src]
Create a new PixelVec from an existing Pixel
pub fn map<U: Type, F: Fn(&T) -> U>(&self, f: F) -> PixelVec<U>
[src]
Create a new PixelVec by mapping f
over an existing PixelVec
pub fn to_vec<C: Color>(&self) -> Vec<T>
[src]
Convert from PixelVec<T>
to Vec<T>
pub fn to_vec_f<C: Color>(&self) -> Vec<f64>
[src]
Convert from PixelVec<T>
to Vec<f64>
and normalize values
pub fn to_float(&self) -> PixelVec<f64>
[src]
Convert from PixelVec<T>
to PixelVec<f64>
pub fn to_f(&self) -> PixelVec<f64>
[src]
Convert from PixelVec<T>
to PixelVec<f64>
and normalize values
Trait Implementations
impl<'a, T: Type, C: Color> Pixel<'a, T, C> for PixelVec<T>
[src]
fn to_vec(&self) -> Vec<T>
[src]
fn to_f(&self) -> Vec<f64>
[src]
fn to_pixel_vec(&self) -> PixelVec<T>
[src]
fn to_pixel_vec_f(&self) -> PixelVec<f64>
[src]
fn is_true(&self) -> bool
[src]
fn is_false(&self) -> bool
[src]
fn map<F: FnMut(&T) -> T>(&self, f: F) -> PixelVec<T>
[src]
fn iter(&self) -> Iter<T>
[src]
fn to_rgb(&self) -> LinSrgb
[src]
fn from_rgb(px: Rgb) -> PixelVec<f64>
[src]
fn to_rgba(&self) -> LinSrgba
[src]
fn from_rgba(px: Rgba) -> PixelVec<f64>
[src]
fn to_luma(&self) -> LinLuma
[src]
fn from_luma(px: Luma) -> PixelVec<f64>
[src]
fn to_hsv(&self) -> Hsv
[src]
fn from_hsv(px: Hsv) -> PixelVec<f64>
[src]
fn to_lab(&self) -> Lab
[src]
fn from_lab(px: Lab) -> PixelVec<f64>
[src]
impl<'a, T: Type, C: Color> PixelMut<'a, T, C> for PixelVec<T>
[src]
fn set_f<P: Pixel<'a, f64, C>>(&mut self, other: &P)
[src]
fn set<P: Pixel<'a, T, C>>(&mut self, other: &P)
[src]
fn iter_mut(&mut self) -> IterMut<T>
[src]
fn blend_alpha(&mut self)
[src]
impl<T: Type> AsRef<[T]> for PixelVec<T>
[src]
impl<T: Type> AsMut<[T]> for PixelVec<T>
[src]
impl<T: Clone + Type> Clone for PixelVec<T>
[src]
impl<T: Copy + Type> Copy for PixelVec<T>
[src]
impl<T: Debug + Type> Debug for PixelVec<T>
[src]
impl<T: Type> Div<PixelVec<T>> for PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self::Output
[src]
impl<'a, T: Type> Div<&'a PixelVec<T>> for &'a PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self::Output
[src]
impl<T: Type> Rem<PixelVec<T>> for PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self::Output
[src]
impl<'a, T: Type> Rem<&'a PixelVec<T>> for &'a PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self::Output
[src]
impl<T: Type> Sub<PixelVec<T>> for PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
impl<'a, T: Type> Sub<&'a PixelVec<T>> for &'a PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
impl<T: Type> Add<PixelVec<T>> for PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
impl<'a, T: Type> Add<&'a PixelVec<T>> for &'a PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
impl<T: Type> Mul<PixelVec<T>> for PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self::Output
[src]
impl<'a, T: Type> Mul<&'a PixelVec<T>> for &'a PixelVec<T>
[src]
type Output = PixelVec<T>
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self::Output
[src]
impl<T: Type> AddAssign<PixelVec<T>> for PixelVec<T>
[src]
fn add_assign(&mut self, other: Self)
[src]
impl<'a, T: Type> AddAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>
[src]
fn add_assign(&mut self, other: Self)
[src]
impl<T: Type> SubAssign<PixelVec<T>> for PixelVec<T>
[src]
fn sub_assign(&mut self, other: Self)
[src]
impl<'a, T: Type> SubAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>
[src]
fn sub_assign(&mut self, other: Self)
[src]
impl<T: Type> MulAssign<PixelVec<T>> for PixelVec<T>
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl<'a, T: Type> MulAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl<T: Type> DivAssign<PixelVec<T>> for PixelVec<T>
[src]
fn div_assign(&mut self, other: Self)
[src]
impl<'a, T: Type> DivAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>
[src]
fn div_assign(&mut self, other: Self)
[src]
impl<T: Type> RemAssign<PixelVec<T>> for PixelVec<T>
[src]
fn rem_assign(&mut self, other: Self)
[src]
impl<'a, T: Type> RemAssign<&'a mut PixelVec<T>> for &'a mut PixelVec<T>
[src]
fn rem_assign(&mut self, other: Self)
[src]
impl<T: Type> Serialize for PixelVec<T> where
T: Serialize,
[src]
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, T: Type> Deserialize<'de> for PixelVec<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<T> Send for PixelVec<T>
impl<T> Sync for PixelVec<T>
impl<T> Unpin for PixelVec<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PixelVec<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for PixelVec<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
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, 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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,