Struct nannou::image::LumaA [−][src]
Expand description
Grayscale colors + alpha channel
Trait Implementations
type Subpixel = T
type Subpixel = T
The underlying subpixel type.
The number of channels of this pixel type.
ColorType for this pixel format
Returns the components as a slice.
Returns the components as a mutable slice
Returns the channels of this pixel as a 4 tuple. If the pixel has less than 4 channels the remainder is filled with the maximum value Read more
Construct a pixel from the 4 channels a, b, c and d. If the pixel does not contain 4 channels the extra are ignored. Read more
Returns a view into a slice. Read more
Returns mutable view into a mutable slice. Read more
Convert this pixel to luma with an alpha channel
Apply the function f
to each channel of this pixel.
Apply the function f
to each channel of this pixel.
pub fn map_with_alpha<F, G>(&self, f: F, g: G) -> LumaA<T> where
F: FnMut(T) -> T,
G: FnMut(T) -> T,
pub fn map_with_alpha<F, G>(&self, f: F, g: G) -> LumaA<T> where
F: FnMut(T) -> T,
G: FnMut(T) -> T,
Apply the function f
to each channel except the alpha channel.
Apply the function g
to the alpha channel. Read more
Apply the function f
to each channel except the alpha channel.
Apply the function g
to the alpha channel. Works in-place. Read more
Apply the function f
to each channel of this pixel and
other
pairwise. Read more
Apply the function f
to each channel of this pixel and
other
pairwise. Works in-place. Read more
Blend the color of a given pixel into ourself, taking into account alpha channels
please use CHANNEL_COUNT associated constant
Returns the number of channels of this pixel type.
please use COLOR_MODEL associated constant
please use COLOR_TYPE associated constant
Returns the ColorType for this pixel format
Apply the function f
to each channel except the alpha channel.
Auto Trait Implementations
impl<T> RefUnwindSafe for LumaA<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for LumaA<T> where
T: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V