pub struct Color { /* private fields */ }Expand description
A color represented by red, green, blue, and alpha channels in the range 0.0 to 1.0.
Implementations§
Source§impl Color
Implements methods for Color.
impl Color
Implements methods for Color.
Source§impl Color
impl Color
pub fn get_red(&self) -> f64
pub fn get_mut_red(&mut self) -> &mut f64
pub fn set_red(&mut self, val: f64) -> &mut Self
pub fn get_green(&self) -> f64
pub fn get_mut_green(&mut self) -> &mut f64
pub fn set_green(&mut self, val: f64) -> &mut Self
pub fn get_blue(&self) -> f64
pub fn get_mut_blue(&mut self) -> &mut f64
pub fn set_blue(&mut self, val: f64) -> &mut Self
pub fn get_alpha(&self) -> f64
pub fn get_mut_alpha(&mut self) -> &mut f64
pub fn set_alpha(&mut self, val: f64) -> &mut Self
Trait Implementations§
impl Copy for Color
Source§impl PartialOrd for Color
impl PartialOrd for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more