Struct mutils::Colour [−][src]
Implementations
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, mut amount: f32) -> Self
[src]
pub fn mix_no_alpha(self, other: Self, mut amount: f32) -> Self
[src]
pub fn to_rgba_u32(self) -> u32
[src]
Trait Implementations
impl Add<Colour> for Colour
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl AddAssign<Colour> for Colour
[src]
fn add_assign(&mut self, other: Self)
[src]
impl Clone for Colour
[src]
impl Copy for Colour
[src]
impl Debug for Colour
[src]
impl Div<Colour> for Colour
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
impl Div<f32> for Colour
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, val: f32) -> Self
[src]
impl DivAssign<Colour> for Colour
[src]
fn div_assign(&mut self, other: Self)
[src]
impl DivAssign<f32> for Colour
[src]
fn div_assign(&mut self, val: f32)
[src]
impl Mul<Colour> for Colour
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
impl Mul<f32> for Colour
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, val: f32) -> Self
[src]
impl MulAssign<Colour> for Colour
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl MulAssign<f32> for Colour
[src]
fn mul_assign(&mut self, val: f32)
[src]
impl PartialEq<Colour> for Colour
[src]
impl Rem<Colour> for Colour
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
[src]
impl StructuralPartialEq for Colour
[src]
impl Sub<Colour> for Colour
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
impl SubAssign<Colour> for Colour
[src]
fn sub_assign(&mut self, other: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Colour
[src]
impl Send for Colour
[src]
impl Sync for Colour
[src]
impl Unpin for Colour
[src]
impl UnwindSafe for Colour
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,