pub struct RgbaColor<T> {
pub alpha: T,
pub red: T,
pub green: T,
pub blue: T,
}
Expand description
RgbaColor stores the red, green, blue and alpha components of a color
with the precision of the generic parameter T. For example if T is f32,
the values are normalized between 0 and 1. If T is u8, they values range
is 0 to 255.
This is merely a helper class for use with Color
.
Fieldsยง
ยงalpha: T
The alpha component.
red: T
The red channel.
green: T
The green channel.
blue: T
The blue channel.
Trait Implementationsยง
ยงimpl<T> PartialEq<RgbaColor<T>> for RgbaColor<T>where
T: PartialEq<T>,
impl<T> PartialEq<RgbaColor<T>> for RgbaColor<T>where
T: PartialEq<T>,
impl<T> Copy for RgbaColor<T>where
T: Copy,
impl<T> StructuralPartialEq for RgbaColor<T>
Auto Trait Implementationsยง
impl<T> RefUnwindSafe for RgbaColor<T>where
T: RefUnwindSafe,
impl<T> Send for RgbaColor<T>where
T: Send,
impl<T> Sync for RgbaColor<T>where
T: Sync,
impl<T> Unpin for RgbaColor<T>where
T: Unpin,
impl<T> UnwindSafe for RgbaColor<T>where
T: UnwindSafe,
Blanket Implementationsยง
sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
ยงimpl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
ยงfn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
ยงimpl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
ยงfn null_value() -> T
fn null_value() -> T
The none-equivalent value.
ยงimpl<T> Pointable for T
impl<T> Pointable for T
sourceยงimpl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
sourceยงfn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.