[][src]Struct embedded_graphics::pixelcolor::Gray4

pub struct Gray4(_);

4 bit grayscale color.

Methods

impl Gray4[src]

pub const fn new(luma: u8) -> Self[src]

Creates a new grayscale color.

Too large luma values are masked to the valid range by setting the upper bits to 0.

Trait Implementations

impl Clone for Gray4[src]

impl Copy for Gray4[src]

impl Debug for Gray4[src]

impl Default for Gray4[src]

impl Eq for Gray4[src]

impl From<BinaryColor> for Gray4[src]

impl From<Gray4> for Rgb555[src]

impl From<Gray4> for Bgr555[src]

impl From<Gray4> for Rgb565[src]

impl From<Gray4> for Bgr565[src]

impl From<Gray4> for Rgb888[src]

impl From<Gray4> for Bgr888[src]

impl From<Gray4> for RawU4[src]

impl From<RawU4> for Gray4[src]

impl GrayColor for Gray4[src]

const BLACK: Self[src]

Black color (0% luma)

const WHITE: Self[src]

White color (100% luma)

impl Hash for Gray4[src]

impl Ord for Gray4[src]

impl PartialEq<Gray4> for Gray4[src]

impl PartialOrd<Gray4> for Gray4[src]

impl PixelColor for Gray4[src]

type Raw = RawU4

Raw data type. Read more

impl StructuralEq for Gray4[src]

impl StructuralPartialEq for Gray4[src]

Auto Trait Implementations

impl Send for Gray4

impl Sync for Gray4

impl Unpin for Gray4

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<C> IntoStorage for C where
    C: PixelColor,
    <C as PixelColor>::Raw: From<C>, 
[src]

type Storage = <<C as PixelColor>::Raw as RawData>::Storage

The underlying storage type for the pixel color

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,