#[non_exhaustive]pub enum ColorSpaceLayout {
Rectangular,
HueFirst,
HueThird,
}
Expand description
The layout of a color space, particularly the hue component.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rectangular
Rectangular, no hue component.
HueFirst
Cylindrical, hue is first component.
HueThird
Cylindrical, hue is third component.
Implementations§
Source§impl ColorSpaceLayout
impl ColorSpaceLayout
Sourcepub(crate) const fn scale(self, components: [f32; 3], scale: f32) -> [f32; 3]
pub(crate) const fn scale(self, components: [f32; 3], scale: f32) -> [f32; 3]
Multiply all components except for hue by scale.
This function is used for both premultiplying and un-premultiplying. See §12.3 of Color 4 spec for context.
pub(crate) const fn hue_channel(self) -> Option<usize>
Trait Implementations§
Source§impl Clone for ColorSpaceLayout
impl Clone for ColorSpaceLayout
Source§fn clone(&self) -> ColorSpaceLayout
fn clone(&self) -> ColorSpaceLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ColorSpaceLayout
impl Debug for ColorSpaceLayout
Source§impl PartialEq for ColorSpaceLayout
impl PartialEq for ColorSpaceLayout
impl Copy for ColorSpaceLayout
impl Eq for ColorSpaceLayout
impl StructuralPartialEq for ColorSpaceLayout
Auto Trait Implementations§
impl Freeze for ColorSpaceLayout
impl RefUnwindSafe for ColorSpaceLayout
impl Send for ColorSpaceLayout
impl Sync for ColorSpaceLayout
impl Unpin for ColorSpaceLayout
impl UnwindSafe for ColorSpaceLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more