#[repr(C)]pub struct DciP3<ComponentTy = f32> {
pub r: ComponentTy,
pub g: ComponentTy,
pub b: ComponentTy,
}
Expand description
A color in the DCI-P3 (aka P3 DCI and P3 D60) color space.
If you are looking for the P3 which is used on new Apple displays, see
DisplayP3
instead.
This color space uses the P3 primaries and D60 white point.
Fields
r: ComponentTy
The red component.
g: ComponentTy
The green component.
b: ComponentTy
The blue component.
Trait Implementations
sourceimpl<CTy: Clone + Copy> ColorType for DciP3<CTy>
impl<CTy: Clone + Copy> ColorType for DciP3<CTy>
type ComponentTy = CTy
const SPACE: Spaces = Spaces::DciP3
const NUM_COMPONENTS: usize = 3usize
sourceimpl<ComponentTy: Copy> From<PremultipliedAlpha<DciP3<ComponentTy>>> for DciP3<ComponentTy>
impl<ComponentTy: Copy> From<PremultipliedAlpha<DciP3<ComponentTy>>> for DciP3<ComponentTy>
sourcefn from(col_alpha: PremultipliedAlpha<DciP3<ComponentTy>>) -> DciP3<ComponentTy>
fn from(col_alpha: PremultipliedAlpha<DciP3<ComponentTy>>) -> DciP3<ComponentTy>
Converts to this type from the input type.
sourceimpl<ComponentTy: Ord> Ord for DciP3<ComponentTy>
impl<ComponentTy: Ord> Ord for DciP3<ComponentTy>
sourceimpl<ComponentTy: PartialOrd> PartialOrd<DciP3<ComponentTy>> for DciP3<ComponentTy>
impl<ComponentTy: PartialOrd> PartialOrd<DciP3<ComponentTy>> for DciP3<ComponentTy>
sourcefn partial_cmp(&self, other: &DciP3<ComponentTy>) -> Option<Ordering>
fn partial_cmp(&self, other: &DciP3<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
impl<ComponentTy: Copy> Copy for DciP3<ComponentTy>
impl<ComponentTy: Eq> Eq for DciP3<ComponentTy>
impl<ComponentTy: Pod> Pod for DciP3<ComponentTy>
impl<ComponentTy> StructuralEq for DciP3<ComponentTy>
impl<ComponentTy> StructuralPartialEq for DciP3<ComponentTy>
Auto Trait Implementations
impl<ComponentTy> RefUnwindSafe for DciP3<ComponentTy> where
ComponentTy: RefUnwindSafe,
impl<ComponentTy> Send for DciP3<ComponentTy> where
ComponentTy: Send,
impl<ComponentTy> Sync for DciP3<ComponentTy> where
ComponentTy: Sync,
impl<ComponentTy> Unpin for DciP3<ComponentTy> where
ComponentTy: Unpin,
impl<ComponentTy> UnwindSafe for DciP3<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
.