pub struct L(pub u8);Expand description
Represents an L, or luminance pixel that is stored as only one single number representing how bright, or intense, the pixel is.
This can be thought of as the “unit channel” as this represents only a single channel in which other pixel types can be composed of.
Tuple Fields
0: u8The luminance value of the pixel, between 0 and 255.
Implementations
Trait Implementations
sourceimpl Pixel for L
impl Pixel for L
type Data = [u8; 1]
sourcefn from_pixel_data(data: PixelData) -> Result<Self>
fn from_pixel_data(data: PixelData) -> Result<Self>
Creates this pixel from raw data. Read more
sourcefn as_pixel_data(&self) -> PixelData
fn as_pixel_data(&self) -> PixelData
Creates raw pixel data from this pixel type.
sourcefn merge_with_alpha(self, other: Self, alpha: u8) -> Self
fn merge_with_alpha(self, other: Self, alpha: u8) -> Self
Merges this pixel with the given overlay pixel, where the alpha of the overlay pixel is known. This is used in anti-aliasing. Read more
sourcefn from_dynamic(dynamic: Dynamic) -> Self
fn from_dynamic(dynamic: Dynamic) -> Self
Creates this pixel from any dynamic pixel…dynamically at runtime. Different from the From/Into traits. Read more
sourcefn merge(self, other: Self) -> Self
fn merge(self, other: Self) -> Self
Merges this pixel with the given overlay pixel, taking into account alpha.
sourcefn overlay(self, other: Self, mode: OverlayMode) -> Self
fn overlay(self, other: Self, mode: OverlayMode) -> Self
Overlays this pixel with the given overlay pixel, abiding by the given overlay mode.
sourcefn overlay_with_alpha(self, other: Self, mode: OverlayMode, alpha: u8) -> Self
fn overlay_with_alpha(self, other: Self, mode: OverlayMode, alpha: u8) -> Self
Overlays this pixel with the given overlay pixel, abiding by the given overlay mode with the given alpha. Read more
impl Copy for L
impl Eq for L
impl StructuralEq for L
impl StructuralPartialEq for L
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more