Struct color::AlphaColor [−][src]
pub struct AlphaColor<T, C> { pub c: C, pub a: T, }
Fields
c: C
a: T
Trait Implementations
impl<T, C: ToRgb> ToRgb for AlphaColor<T, C>
[src]
impl<T, C: ToRgb> ToRgb for AlphaColor<T, C>
impl<T: Clone, C: Clone> Clone for AlphaColor<T, C>
[src]
impl<T: Clone, C: Clone> Clone for AlphaColor<T, C>
fn clone(&self) -> AlphaColor<T, C>
[src]
fn clone(&self) -> AlphaColor<T, C>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Copy, C: Copy> Copy for AlphaColor<T, C>
[src]
impl<T: Copy, C: Copy> Copy for AlphaColor<T, C>
impl<T: PartialEq, C: PartialEq> PartialEq for AlphaColor<T, C>
[src]
impl<T: PartialEq, C: PartialEq> PartialEq for AlphaColor<T, C>
fn eq(&self, other: &AlphaColor<T, C>) -> bool
[src]
fn eq(&self, other: &AlphaColor<T, C>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &AlphaColor<T, C>) -> bool
[src]
fn ne(&self, other: &AlphaColor<T, C>) -> bool
This method tests for !=
.
impl<T: Eq, C: Eq> Eq for AlphaColor<T, C>
[src]
impl<T: Eq, C: Eq> Eq for AlphaColor<T, C>
impl<T: Debug, C: Debug> Debug for AlphaColor<T, C>
[src]
impl<T: Debug, C: Debug> Debug for AlphaColor<T, C>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Channel, C: Color<T>> Color<T> for AlphaColor<T, C>
[src]
impl<T: Channel, C: Color<T>> Color<T> for AlphaColor<T, C>
fn clamp_s(self, lo: T, hi: T) -> AlphaColor<T, C>
[src]
fn clamp_s(self, lo: T, hi: T) -> AlphaColor<T, C>
Clamps the components of the color to the range (lo,hi)
.
fn clamp_c(self, lo: AlphaColor<T, C>, hi: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn clamp_c(self, lo: AlphaColor<T, C>, hi: AlphaColor<T, C>) -> AlphaColor<T, C>
Clamps the components of the color component-wise between lo
and hi
.
fn inverse(self) -> AlphaColor<T, C>
[src]
fn inverse(self) -> AlphaColor<T, C>
Inverts the color.
fn mix(self, other: Self, value: T) -> Self
[src]
fn mix(self, other: Self, value: T) -> Self
impl<T: Channel, C: ToRgb> ToRgba for AlphaColor<T, C>
[src]
impl<T: Channel, C: ToRgb> ToRgba for AlphaColor<T, C>
impl<T: Channel, C: Mul<Output = C>> Mul for AlphaColor<T, C>
[src]
impl<T: Channel, C: Mul<Output = C>> Mul for AlphaColor<T, C>
type Output = AlphaColor<T, C>
The resulting type after applying the *
operator.
fn mul(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn mul(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
Performs the *
operation.
impl<T: Channel + Mul<T, Output = T>, C: Mul<T, Output = C>> Mul<T> for AlphaColor<T, C>
[src]
impl<T: Channel + Mul<T, Output = T>, C: Mul<T, Output = C>> Mul<T> for AlphaColor<T, C>
type Output = AlphaColor<T, C>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> AlphaColor<T, C>
[src]
fn mul(self, rhs: T) -> AlphaColor<T, C>
Performs the *
operation.
impl<T: Channel, C: Div<Output = C>> Div for AlphaColor<T, C>
[src]
impl<T: Channel, C: Div<Output = C>> Div for AlphaColor<T, C>
type Output = AlphaColor<T, C>
The resulting type after applying the /
operator.
fn div(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn div(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
Performs the /
operation.
impl<T: Channel + Div<T, Output = T>, C: Div<T, Output = C>> Div<T> for AlphaColor<T, C>
[src]
impl<T: Channel + Div<T, Output = T>, C: Div<T, Output = C>> Div<T> for AlphaColor<T, C>
type Output = AlphaColor<T, C>
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> AlphaColor<T, C>
[src]
fn div(self, rhs: T) -> AlphaColor<T, C>
Performs the /
operation.
impl<T: Channel + Add<T, Output = T>, C: Add<Output = C>> Add for AlphaColor<T, C>
[src]
impl<T: Channel + Add<T, Output = T>, C: Add<Output = C>> Add for AlphaColor<T, C>
type Output = AlphaColor<T, C>
The resulting type after applying the +
operator.
fn add(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn add(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
Performs the +
operation.
impl<T: Channel + Sub<T, Output = T>, C: Sub<Output = C>> Sub for AlphaColor<T, C>
[src]
impl<T: Channel + Sub<T, Output = T>, C: Sub<Output = C>> Sub for AlphaColor<T, C>
type Output = AlphaColor<T, C>
The resulting type after applying the -
operator.
fn sub(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn sub(self, rhs: AlphaColor<T, C>) -> AlphaColor<T, C>
Performs the -
operation.
impl<T: Channel + Saturating, C: Saturating> Saturating for AlphaColor<T, C>
[src]
impl<T: Channel + Saturating, C: Saturating> Saturating for AlphaColor<T, C>
fn saturating_add(self, v: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn saturating_add(self, v: AlphaColor<T, C>) -> AlphaColor<T, C>
Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing. Read more
fn saturating_sub(self, v: AlphaColor<T, C>) -> AlphaColor<T, C>
[src]
fn saturating_sub(self, v: AlphaColor<T, C>) -> AlphaColor<T, C>
Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing. Read more
impl<T, C: AsRef<[T; 3]>> Index<usize> for AlphaColor<T, C>
[src]
impl<T, C: AsRef<[T; 3]>> Index<usize> for AlphaColor<T, C>
type Output = T
The returned type after indexing.
ⓘImportant traits for &'a mut Rfn index<'a>(&'a self, index: usize) -> &'a T
[src]
fn index<'a>(&'a self, index: usize) -> &'a T
Performs the indexing (container[index]
) operation.
impl<T, C: AsRef<[T; 3]> + AsMut<[T; 3]>> IndexMut<usize> for AlphaColor<T, C>
[src]
impl<T, C: AsRef<[T; 3]> + AsMut<[T; 3]>> IndexMut<usize> for AlphaColor<T, C>
ⓘImportant traits for &'a mut Rfn index_mut<'a>(&'a mut self, index: usize) -> &'a mut T
[src]
fn index_mut<'a>(&'a mut self, index: usize) -> &'a mut T
Performs the mutable indexing (container[index]
) operation.
impl<T, C: AsRef<[T; 3]>> AsRef<[T; 4]> for AlphaColor<T, C>
[src]
impl<T, C: AsRef<[T; 3]>> AsRef<[T; 4]> for AlphaColor<T, C>
impl<T, C: AsMut<[T; 3]>> AsMut<[T; 4]> for AlphaColor<T, C>
[src]
impl<T, C: AsMut<[T; 3]>> AsMut<[T; 4]> for AlphaColor<T, C>
Auto Trait Implementations
impl<T, C> Send for AlphaColor<T, C> where
C: Send,
T: Send,
impl<T, C> Send for AlphaColor<T, C> where
C: Send,
T: Send,
impl<T, C> Sync for AlphaColor<T, C> where
C: Sync,
T: Sync,
impl<T, C> Sync for AlphaColor<T, C> where
C: Sync,
T: Sync,