pub struct Pix2<C, M, A, G>{ /* private fields */ }Expand description
Pixel with two channels in its color model.
Implementations§
Trait Implementations§
Source§impl<C, M, A, G> Pixel for Pix2<C, M, A, G>
impl<C, M, A, G> Pixel for Pix2<C, M, A, G>
Source§fn from_channels(ch: &[C]) -> Self
fn from_channels(ch: &[C]) -> Self
Make a pixel from a slice of channels.
Source§fn from_bit_depth<P>(p: P) -> Self
fn from_bit_depth<P>(p: P) -> Self
Convert from a pixel with a different bit depth.
Source§fn channels_mut(&mut self) -> &mut [Self::Chan]
fn channels_mut(&mut self) -> &mut [Self::Chan]
Get the channels mutably.
Source§fn alpha_mut(&mut self) -> &mut Self::Chan
fn alpha_mut(&mut self) -> &mut Self::Chan
Get a mutable reference to the alpha channel. Read more
Source§fn copy_color(dst: &mut [Self], clr: &Self)
fn copy_color(dst: &mut [Self], clr: &Self)
Copy a color to a pixel slice
Source§fn copy_slice(dst: &mut [Self], src: &[Self])
fn copy_slice(dst: &mut [Self], src: &[Self])
Copy a slice to another
Source§fn composite_color<O>(dst: &mut [Self], clr: &Self, op: O)
fn composite_color<O>(dst: &mut [Self], clr: &Self, op: O)
Composite a color with a pixel slice
Source§fn composite_matte<M, O>(dst: &mut [Self], src: &[M], clr: &Self, op: O)
fn composite_matte<M, O>(dst: &mut [Self], src: &[M], clr: &Self, op: O)
Composite matte with color to destination pixel slice
Source§fn composite_slice<O>(dst: &mut [Self], src: &[Self], op: O)
fn composite_slice<O>(dst: &mut [Self], src: &[Self], op: O)
Composite two slices of pixels
Source§fn composite_channels<O>(&mut self, src: &Self, op: O)
fn composite_channels<O>(&mut self, src: &Self, op: O)
Composite the channels of two pixels
Source§fn composite_channels_alpha<O>(&mut self, src: &Self, op: O, alpha: &Self::Chan)
fn composite_channels_alpha<O>(&mut self, src: &Self, op: O, alpha: &Self::Chan)
Composite the channels of two pixels with alpha
impl<C, M, A, G> Copy for Pix2<C, M, A, G>
impl<C, M, A, G> Eq for Pix2<C, M, A, G>
impl<C, M, A, G> StructuralPartialEq for Pix2<C, M, A, G>
Auto Trait Implementations§
impl<C, M, A, G> Freeze for Pix2<C, M, A, G>where
C: Freeze,
impl<C, M, A, G> RefUnwindSafe for Pix2<C, M, A, G>
impl<C, M, A, G> Send for Pix2<C, M, A, G>
impl<C, M, A, G> Sync for Pix2<C, M, A, G>
impl<C, M, A, G> Unpin for Pix2<C, M, A, G>
impl<C, M, A, G> UnwindSafe for Pix2<C, M, A, G>
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