pub enum ColorSpace {
Linear,
Gamma2,
SimpleSRGB,
FullSRGBGamma,
}Expand description
The colorspace used to interpret pixel values.
This is a very limited subset of SkColorSpace.
Variants§
Linear
Linear RGB, the default. Assumes #7f7f7f is half as bright as #ffffff.
Gamma2
Apply a gamma factor of 2.
This is the fastest gamma correction to apply, and produces reasonable quality blending.
SimpleSRGB
Apply a gamma factor of 2.2.
This is also known as “simple sRGB”; it’s very close to the actual gamma function specified by the sRGB color space, but much faster to compute.
FullSRGBGamma
Apply the full sRGB gamma function.
This does not convert the RGB colors to CIE XYZ for blending; it only applies the (full) gamma function.
Trait Implementations§
Source§impl Clone for ColorSpace
impl Clone for ColorSpace
Source§fn clone(&self) -> ColorSpace
fn clone(&self) -> ColorSpace
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 ColorSpace
impl Debug for ColorSpace
Source§impl Default for ColorSpace
impl Default for ColorSpace
Source§fn default() -> ColorSpace
fn default() -> ColorSpace
Returns the “default value” for a type. Read more
Source§impl Ord for ColorSpace
impl Ord for ColorSpace
Source§fn cmp(&self, other: &ColorSpace) -> Ordering
fn cmp(&self, other: &ColorSpace) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ColorSpace
impl PartialEq for ColorSpace
Source§impl PartialOrd for ColorSpace
impl PartialOrd for ColorSpace
impl Copy for ColorSpace
impl Eq for ColorSpace
impl StructuralPartialEq for ColorSpace
Auto Trait Implementations§
impl Freeze for ColorSpace
impl RefUnwindSafe for ColorSpace
impl Send for ColorSpace
impl Sync for ColorSpace
impl Unpin for ColorSpace
impl UnwindSafe for ColorSpace
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