[][src]Struct olc_pixel_game_engine::Pixel

#[repr(C)]pub struct Pixel {
    pub r: u8,
    pub g: u8,
    pub b: u8,
    pub a: u8,
}

Mirror of olc::Pixel. Represents a 32-bit RGBA value.

Fields

r: u8g: u8b: u8a: u8

Implementations

impl Pixel[src]

pub const fn rgba(r: u8, g: u8, b: u8, a: u8) -> Self[src]

Creates a new pixel with RGBA value.

pub const fn rgb(r: u8, g: u8, b: u8) -> Self[src]

Creates a new pixel with RGB value.

Trait Implementations

impl Clone for Pixel[src]

impl Copy for Pixel[src]

impl Debug for Pixel[src]

impl Display for Pixel[src]

impl Eq for Pixel[src]

impl PartialEq<Pixel> for Pixel[src]

impl StructuralEq for Pixel[src]

impl StructuralPartialEq for Pixel[src]

Auto Trait Implementations

impl RefUnwindSafe for Pixel

impl Send for Pixel

impl Sync for Pixel

impl Unpin for Pixel

impl UnwindSafe for Pixel

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<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.