Struct mutils::Colour [−][src]
pub struct Colour { /* fields omitted */ }
Implementations
impl Colour
[src]
impl Colour
[src]pub const WHITE: Colour
[src]
pub const BLACK: Colour
[src]
pub const MAGENTA: Colour
[src]
pub const CYAN: Colour
[src]
pub const YELLOW: Colour
[src]
pub fn new_from_f32s(red: f32, green: f32, blue: f32, alpha: f32) -> Self
[src]
pub const fn new_from_u32s(red: u32, green: u32, blue: u32, alpha: u32) -> Self
[src]
pub const fn new_from_u8s(red: u8, green: u8, blue: u8, alpha: u8) -> Self
[src]
pub const fn new_from_rgba(rgba: u32) -> Self
[src]
pub fn red_f32(&self) -> f32
[src]
pub fn red_u32(&self) -> u32
[src]
pub fn red_u8(&self) -> u8
[src]
pub fn green_f32(&self) -> f32
[src]
pub fn green_u32(&self) -> u32
[src]
pub fn green_u8(&self) -> u8
[src]
pub fn blue_f32(&self) -> f32
[src]
pub fn blue_u32(&self) -> u32
[src]
pub fn blue_u8(&self) -> u8
[src]
pub fn alpha_f32(&self) -> f32
[src]
pub fn alpha_u32(&self) -> u32
[src]
pub fn alpha_u8(&self) -> u8
[src]
pub fn mix(self, other: Self, amount: f32) -> Self
[src]
pub fn mix_no_alpha(self, other: Self, amount: f32) -> Self
[src]
pub fn to_rgba_u32(self) -> u32
[src]
Trait Implementations
impl AddAssign<Colour> for Colour
[src]
impl AddAssign<Colour> for Colour
[src]fn add_assign(&mut self, other: Self)
[src]
fn add_assign(&mut self, other: Self)
[src]Performs the +=
operation. Read more
impl DivAssign<Colour> for Colour
[src]
impl DivAssign<Colour> for Colour
[src]fn div_assign(&mut self, other: Self)
[src]
fn div_assign(&mut self, other: Self)
[src]Performs the /=
operation. Read more
impl DivAssign<f32> for Colour
[src]
impl DivAssign<f32> for Colour
[src]fn div_assign(&mut self, val: f32)
[src]
fn div_assign(&mut self, val: f32)
[src]Performs the /=
operation. Read more
impl MulAssign<Colour> for Colour
[src]
impl MulAssign<Colour> for Colour
[src]fn mul_assign(&mut self, other: Self)
[src]
fn mul_assign(&mut self, other: Self)
[src]Performs the *=
operation. Read more
impl MulAssign<f32> for Colour
[src]
impl MulAssign<f32> for Colour
[src]fn mul_assign(&mut self, val: f32)
[src]
fn mul_assign(&mut self, val: f32)
[src]Performs the *=
operation. Read more
impl SubAssign<Colour> for Colour
[src]
impl SubAssign<Colour> for Colour
[src]fn sub_assign(&mut self, other: Self)
[src]
fn sub_assign(&mut self, other: Self)
[src]Performs the -=
operation. Read more
impl Copy for Colour
[src]
impl StructuralPartialEq for Colour
[src]
Auto Trait Implementations
impl RefUnwindSafe for Colour
impl Send for Colour
impl Sync for Colour
impl Unpin for Colour
impl UnwindSafe for Colour
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
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,