Enum sdl2::pixels::Color [] [src]

pub enum Color {
    RGB(u8u8u8),
    RGBA(u8u8u8u8),
}

Variants

RGB(u8u8u8)RGBA(u8u8u8u8)

Methods

impl Color
[src]

fn to_u32(&self, format: &PixelFormat) -> u32

fn from_u32(format: &PixelFormat, pixel: u32) -> Color

fn rgb(&self) -> (u8, u8, u8)

Trait Implementations

impl Debug for Color
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Hash for Color
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl PartialEq for Color
[src]

fn eq(&self, __arg_0: &Color) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Color) -> bool

This method tests for !=.

impl Eq for Color
[src]

impl Clone for Color
[src]

fn clone(&self) -> Color

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Copy for Color
[src]

impl Rand for Color
[src]

fn rand<R: Rng>(rng: &mut R) -> Color

Generates a random instance of this type using the specified source of randomness. Read more