[][src]Enum embedded_graphics::pixelcolor::BinaryColor

pub enum BinaryColor {
    Off,
    On,
}

Binary color.

BinaryColor is used for displays and images with two possible color states.

The interpretation of active and inactive states can be different for different types of displays. A BinaryColor::On might represent a black pixel on an LCD and a white pixel on an OLED display.

To simplify the conversion from BinaryColor to RGB and grayscale color types the default conversions assume that BinaryColor::Off is black and BinaryColor::On is white.

Variants

Off

Inactive pixel.

On

Active pixel.

Methods

impl BinaryColor[src]

pub fn invert(&self) -> Self[src]

Inverts the color.

Trait Implementations

impl PixelColor for BinaryColor[src]

type Raw = RawU1

Raw data type. Read more

impl PartialEq<BinaryColor> for BinaryColor[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Debug for BinaryColor[src]

impl From<RawU1> for BinaryColor[src]

impl From<BinaryColor> for RawU1[src]

impl From<BinaryColor> for Rgb555[src]

impl From<BinaryColor> for Bgr555[src]

impl From<BinaryColor> for Rgb565[src]

impl From<BinaryColor> for Bgr565[src]

impl From<BinaryColor> for Rgb888[src]

impl From<BinaryColor> for Bgr888[src]

impl From<BinaryColor> for Gray2[src]

impl From<BinaryColor> for Gray4[src]

impl From<BinaryColor> for Gray8[src]

impl Copy for BinaryColor[src]

impl Clone for BinaryColor[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

fn is<T>() -> bool where
    T: Scalar
[src]

Tests if Self the same as the type T Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

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