Struct cint::LinearSrgb
source · [−]#[repr(C)]pub struct LinearSrgb<ComponentTy = f32> {
pub r: ComponentTy,
pub g: ComponentTy,
pub b: ComponentTy,
}
Expand description
A color in the linear (decoded) sRGB color space.
This color space uses the sRGB/Rec.709 primaries, D65 white point,
and sRGB transfer functions. This version is linear, with the
sRGB EOTF, aka “inverse gamma compensation”, applied in order to
decode it from EncodedSrgb
Fields
r: ComponentTy
The red component.
g: ComponentTy
The green component.
b: ComponentTy
The blue component.
Trait Implementations
sourceimpl<ComponentTy> AsMut<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
impl<ComponentTy> AsMut<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
sourceimpl<ComponentTy> AsRef<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
impl<ComponentTy> AsRef<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
sourceimpl<ComponentTy: Clone> Clone for LinearSrgb<ComponentTy>
impl<ComponentTy: Clone> Clone for LinearSrgb<ComponentTy>
sourcefn clone(&self) -> LinearSrgb<ComponentTy>
fn clone(&self) -> LinearSrgb<ComponentTy>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<CTy: Clone + Copy> ColorType for LinearSrgb<CTy>
impl<CTy: Clone + Copy> ColorType for LinearSrgb<CTy>
type ComponentTy = CTy
const SPACE: Spaces = Spaces::LinearSrgb
const NUM_COMPONENTS: usize = 3usize
sourceimpl<ComponentTy: Debug> Debug for LinearSrgb<ComponentTy>
impl<ComponentTy: Debug> Debug for LinearSrgb<ComponentTy>
sourceimpl<ComponentTy> From<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
impl<ComponentTy> From<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
sourcefn from([r, g, b]: [ComponentTy; 3]) -> LinearSrgb<ComponentTy>
fn from([r, g, b]: [ComponentTy; 3]) -> LinearSrgb<ComponentTy>
Converts to this type from the input type.
sourceimpl<ComponentTy: Copy> From<Alpha<LinearSrgb<ComponentTy>>> for LinearSrgb<ComponentTy>
impl<ComponentTy: Copy> From<Alpha<LinearSrgb<ComponentTy>>> for LinearSrgb<ComponentTy>
sourcefn from(col_alpha: Alpha<LinearSrgb<ComponentTy>>) -> LinearSrgb<ComponentTy>
fn from(col_alpha: Alpha<LinearSrgb<ComponentTy>>) -> LinearSrgb<ComponentTy>
Converts to this type from the input type.
sourceimpl<ComponentTy: Copy> From<PremultipliedAlpha<LinearSrgb<ComponentTy>>> for LinearSrgb<ComponentTy>
impl<ComponentTy: Copy> From<PremultipliedAlpha<LinearSrgb<ComponentTy>>> for LinearSrgb<ComponentTy>
sourcefn from(
col_alpha: PremultipliedAlpha<LinearSrgb<ComponentTy>>
) -> LinearSrgb<ComponentTy>
fn from(
col_alpha: PremultipliedAlpha<LinearSrgb<ComponentTy>>
) -> LinearSrgb<ComponentTy>
Converts to this type from the input type.
sourceimpl<ComponentTy: Hash> Hash for LinearSrgb<ComponentTy>
impl<ComponentTy: Hash> Hash for LinearSrgb<ComponentTy>
sourceimpl<ComponentTy> Into<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
impl<ComponentTy> Into<[ComponentTy; 3]> for LinearSrgb<ComponentTy>
sourceimpl<ComponentTy: Ord> Ord for LinearSrgb<ComponentTy>
impl<ComponentTy: Ord> Ord for LinearSrgb<ComponentTy>
sourceimpl<ComponentTy: PartialEq> PartialEq<LinearSrgb<ComponentTy>> for LinearSrgb<ComponentTy>
impl<ComponentTy: PartialEq> PartialEq<LinearSrgb<ComponentTy>> for LinearSrgb<ComponentTy>
sourcefn eq(&self, other: &LinearSrgb<ComponentTy>) -> bool
fn eq(&self, other: &LinearSrgb<ComponentTy>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LinearSrgb<ComponentTy>) -> bool
fn ne(&self, other: &LinearSrgb<ComponentTy>) -> bool
This method tests for !=
.
sourceimpl<ComponentTy: PartialOrd> PartialOrd<LinearSrgb<ComponentTy>> for LinearSrgb<ComponentTy>
impl<ComponentTy: PartialOrd> PartialOrd<LinearSrgb<ComponentTy>> for LinearSrgb<ComponentTy>
sourcefn partial_cmp(&self, other: &LinearSrgb<ComponentTy>) -> Option<Ordering>
fn partial_cmp(&self, other: &LinearSrgb<ComponentTy>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<ComponentTy: Zeroable> Zeroable for LinearSrgb<ComponentTy>
impl<ComponentTy: Zeroable> Zeroable for LinearSrgb<ComponentTy>
impl<ComponentTy: Copy> Copy for LinearSrgb<ComponentTy>
impl<ComponentTy: Eq> Eq for LinearSrgb<ComponentTy>
impl<ComponentTy: Pod> Pod for LinearSrgb<ComponentTy>
impl<ComponentTy> StructuralEq for LinearSrgb<ComponentTy>
impl<ComponentTy> StructuralPartialEq for LinearSrgb<ComponentTy>
Auto Trait Implementations
impl<ComponentTy> RefUnwindSafe for LinearSrgb<ComponentTy> where
ComponentTy: RefUnwindSafe,
impl<ComponentTy> Send for LinearSrgb<ComponentTy> where
ComponentTy: Send,
impl<ComponentTy> Sync for LinearSrgb<ComponentTy> where
ComponentTy: Sync,
impl<ComponentTy> Unpin for LinearSrgb<ComponentTy> where
ComponentTy: Unpin,
impl<ComponentTy> UnwindSafe for LinearSrgb<ComponentTy> where
ComponentTy: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during is_valid_bit_pattern
. Read more
sourcefn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits
as &Self
.