Struct dcolor::Rgba
[−]
[src]
#[repr(C)]pub struct Rgba<T> { pub r: T, pub g: T, pub b: T, pub a: T, }
Red-green-blue-alpha color type.
Fields
r: T
g: T
b: T
a: T
Methods
impl<T> Rgba<T>
[src]
fn drop_alpha(self) -> Rgb<T>
fn new(r: T, g: T, b: T, a: T) -> Rgba<T>
fn split_alpha(self) -> (Rgb<T>, T)
Trait Implementations
impl<F, T> FromColor<Lum<F>> for Rgba<T> where
F: ClampInto<T>,
T: Clone + Clamp,
[src]
F: ClampInto<T>,
T: Clone + Clamp,
fn from_color(color: Lum<F>) -> Rgba<T>
impl<F, T> FromColor<Option<Lum<F>>> for Rgba<T> where
F: ClampInto<T>,
T: Clone + Clamp,
[src]
F: ClampInto<T>,
T: Clone + Clamp,
fn from_color(color: Option<Lum<F>>) -> Rgba<T>
impl<F, T> FromColor<Luma<F>> for Rgba<T> where
F: ClampInto<T>,
T: Clone,
[src]
F: ClampInto<T>,
T: Clone,
fn from_color(color: Luma<F>) -> Rgba<T>
impl<F, T> FromColor<Rgb<F>> for Rgba<T> where
F: ClampInto<T>,
T: Clamp,
[src]
F: ClampInto<T>,
T: Clamp,
fn from_color(color: Rgb<F>) -> Rgba<T>
impl<F, T> FromColor<Option<Rgb<F>>> for Rgba<T> where
F: ClampInto<T>,
T: Clamp,
[src]
F: ClampInto<T>,
T: Clamp,
fn from_color(color: Option<Rgb<F>>) -> Rgba<T>
impl<F, T> FromColor<Rgba<F>> for Rgba<T> where
F: ClampInto<T>,
[src]
F: ClampInto<T>,
fn from_color(color: Rgba<F>) -> Rgba<T>
impl<T: Clone> Clone for Rgba<T>
[src]
fn clone(&self) -> Rgba<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for Rgba<T>
[src]
impl<T: Debug> Debug for Rgba<T>
[src]
impl<T: Default> Default for Rgba<T>
[src]
impl<T: Eq> Eq for Rgba<T>
[src]
impl<T: Hash> Hash for Rgba<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PartialEq> PartialEq for Rgba<T>
[src]
fn eq(&self, __arg_0: &Rgba<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rgba<T>) -> bool
This method tests for !=
.
impl<T> Clamp for Rgba<T> where
T: Clamp,
[src]
T: Clamp,
impl<S, T> Lerp<T> for Rgba<S> where
S: Lerp<T>,
T: Copy,
[src]
S: Lerp<T>,
T: Copy,
impl<T> Luminance for Rgba<T> where
T: ClampInto<f64>,
[src]
T: ClampInto<f64>,