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

pub enum Color {
    RGB(u8, u8, u8),
    RGBA(u8, u8, u8, u8),
}

Variants

RGB
RGBA

Methods

impl Color

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

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

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

Trait Implementations

impl Rand for Color

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

Derived Implementations

impl Debug for Color

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

impl Hash for Color

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

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

impl PartialEq for Color

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

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

impl Eq for Color

impl Clone for Color

fn clone(&self) -> Color

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

impl Copy for Color