Struct blit::Color
[−]
[src]
pub struct Color(_);
A newtype representing the color in a buffer.
It is divided into alpha (not used), red, green & blue: 0xFF000000: alpha (not used) 0x00FF0000: red 0x0000FF00: green 0x000000FF: blue
Methods
impl Color
[src]
pub fn from_u32(color: u32) -> Self
[src]
Create a color from a 32 bits unsigned int, discard the alpha (last 8 bits).
pub fn from_u8(red: u8, green: u8, blue: u8) -> Self
[src]
Create a color from 3 8 bits unsigned ints and pack them into a 32 bit unsigned int.
pub fn u32(&self) -> u32
[src]
Return the wrapped u32
object.
Trait Implementations
impl Debug for Color
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
[src]
This method tests for !=
.