Struct direct_gui::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]
fn from_u32(color: u32) -> Color[src]
Create a color from a 32 bits unsigned int, discard the alpha (last 8 bits).
fn from_u8(red: u8, green: u8, blue: u8) -> Color[src]
Create a color from 3 8 bits unsigned ints and pack them into a 32 bit unsigned int.
fn u32(&self) -> u32[src]
Return the wrapped u32 object.
Trait Implementations
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<Color> 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 !=.
impl Debug for Color[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>[src]
Formats the value using the given formatter.
impl Serialize for Color[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<'de> Deserialize<'de> for Color[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<Color, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
__deserializer: __D
) -> Result<Color, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,