Struct simple_game_engine::Color [−][src]
Fields
r: u8
g: u8
b: u8
a: u8
Implementations
impl Color
[src]
impl Color
[src]pub const fn RGB(r: u8, g: u8, b: u8) -> Color
[src]
pub const fn RGBA(r: u8, g: u8, b: u8, a: u8) -> Color
[src]
pub fn to_u32(self, format: &PixelFormat) -> u32
[src]
pub fn from_u32(format: &PixelFormat, pixel: u32) -> Color
[src]
pub fn invert(self) -> Color
[src]
pub const fn rgb(self) -> (u8, u8, u8)
[src]
pub const fn rgba(self) -> (u8, u8, u8, u8)
[src]
pub const WHITE: Color
[src]
pub const BLACK: Color
[src]
pub const GRAY: Color
[src]
pub const GREY: Color
[src]
pub const RED: Color
[src]
pub const GREEN: Color
[src]
pub const BLUE: Color
[src]
pub const MAGENTA: Color
[src]
pub const YELLOW: Color
[src]
pub const CYAN: Color
[src]
Trait Implementations
impl Copy for Color
[src]
impl Eq for Color
[src]
impl StructuralEq for Color
[src]
impl StructuralPartialEq for Color
[src]
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more