pub type Cam16Jsha<T> = Alpha<Cam16Jsh<T>, T>;
Expand description
Partial CIE CAM16 with lightness, saturation, and an alpha component.
See the Cam16Jsha
implementation in Alpha
.
Aliased Type§
struct Cam16Jsha<T> {
pub color: Cam16Jsh<T>,
pub alpha: T,
}
Fields§
§color: Cam16Jsh<T>
The color.
alpha: T
The transparency component. 0.0 (or 0u8) is fully transparent and 1.0 (or 255u8) is fully opaque.
Implementations
source§impl<C> Alpha<C, <C as Premultiply>::Scalar>where
C: Premultiply,
impl<C> Alpha<C, <C as Premultiply>::Scalar>where
C: Premultiply,
sourcepub fn premultiply(self) -> PreAlpha<C>
pub fn premultiply(self) -> PreAlpha<C>
Alpha mask the color by its transparency.
source§impl<C, A> Alpha<C, A>
impl<C, A> Alpha<C, A>
sourcepub fn iter<'a>(&'a self) -> <&'a Alpha<C, A> as IntoIterator>::IntoIterwhere
&'a Alpha<C, A>: IntoIterator,
pub fn iter<'a>(&'a self) -> <&'a Alpha<C, A> as IntoIterator>::IntoIterwhere
&'a Alpha<C, A>: IntoIterator,
Return an iterator over the colors in the wrapped collections.
sourcepub fn iter_mut<'a>(
&'a mut self,
) -> <&'a mut Alpha<C, A> as IntoIterator>::IntoIterwhere
&'a mut Alpha<C, A>: IntoIterator,
pub fn iter_mut<'a>(
&'a mut self,
) -> <&'a mut Alpha<C, A> as IntoIterator>::IntoIterwhere
&'a mut Alpha<C, A>: IntoIterator,
Return an iterator that allows modifying the colors in the wrapped collections.
source§impl<T, A> Alpha<Cam16Jsh<&mut T>, &mut A>
impl<T, A> Alpha<Cam16Jsh<&mut T>, &mut A>
source§impl<Ct, Ca> Alpha<Cam16Jsh<Ct>, Ca>
impl<Ct, Ca> Alpha<Cam16Jsh<Ct>, Ca>
sourcepub fn get<'a, I, T, A>(
&'a self,
index: I,
) -> Option<Alpha<Cam16Jsh<&'a <I as SliceIndex<[T]>>::Output>, &'a <I as SliceIndex<[A]>>::Output>>
pub fn get<'a, I, T, A>( &'a self, index: I, ) -> Option<Alpha<Cam16Jsh<&'a <I as SliceIndex<[T]>>::Output>, &'a <I as SliceIndex<[A]>>::Output>>
Get a color, or slice of colors, with references to the components at index
. See slice::get
for details.
sourcepub fn get_mut<'a, I, T, A>(
&'a mut self,
index: I,
) -> Option<Alpha<Cam16Jsh<&'a mut <I as SliceIndex<[T]>>::Output>, &'a mut <I as SliceIndex<[A]>>::Output>>
pub fn get_mut<'a, I, T, A>( &'a mut self, index: I, ) -> Option<Alpha<Cam16Jsh<&'a mut <I as SliceIndex<[T]>>::Output>, &'a mut <I as SliceIndex<[A]>>::Output>>
Get a color, or slice of colors, that allows modifying the components at index
. See slice::get_mut
for details.
source§impl<T, A> Alpha<Cam16Jsh<T>, A>
impl<T, A> Alpha<Cam16Jsh<T>, A>
“Cam16Jsha
implementations.
sourcepub fn new<H>(
lightness: T,
saturation: T,
hue: H,
alpha: A,
) -> Alpha<Cam16Jsh<T>, A>
pub fn new<H>( lightness: T, saturation: T, hue: H, alpha: A, ) -> Alpha<Cam16Jsh<T>, A>
Create a partial CIE CAM16 color with transparency.
sourcepub const fn new_const(
lightness: T,
saturation: T,
hue: Cam16Hue<T>,
alpha: A,
) -> Alpha<Cam16Jsh<T>, A>
pub const fn new_const( lightness: T, saturation: T, hue: Cam16Hue<T>, alpha: A, ) -> Alpha<Cam16Jsh<T>, A>
Create a partial CIE CAM16 color with transparency. This is the
same as Cam16Jsh::new
without the generic hue type. It’s temporary until
const fn
supports traits.
sourcepub fn into_components(self) -> (T, T, Cam16Hue<T>, A)
pub fn into_components(self) -> (T, T, Cam16Hue<T>, A)
Convert to a (lightness, saturation, hue, alpha)
tuple.
sourcepub fn from_components<H>(_: (T, T, H, A)) -> Alpha<Cam16Jsh<T>, A>
pub fn from_components<H>(_: (T, T, H, A)) -> Alpha<Cam16Jsh<T>, A>
Convert from a (lightness, saturation, hue, alpha)
tuple.
sourcepub fn from_xyz<WpParam>(
color: Alpha<Xyz<<WpParam as WhitePointParameter<<T as FromScalar>::Scalar>>::StaticWp, T>, A>,
parameters: impl Into<BakedParameters<WpParam, <T as FromScalar>::Scalar>>,
) -> Alpha<Cam16Jsh<T>, A>where
Xyz<<WpParam as WhitePointParameter<<T as FromScalar>::Scalar>>::StaticWp, T>: IntoCam16Unclamped<WpParam, Cam16Jsh<T>, Scalar = <T as FromScalar>::Scalar>,
T: FromScalar,
WpParam: WhitePointParameter<<T as FromScalar>::Scalar>,
pub fn from_xyz<WpParam>(
color: Alpha<Xyz<<WpParam as WhitePointParameter<<T as FromScalar>::Scalar>>::StaticWp, T>, A>,
parameters: impl Into<BakedParameters<WpParam, <T as FromScalar>::Scalar>>,
) -> Alpha<Cam16Jsh<T>, A>where
Xyz<<WpParam as WhitePointParameter<<T as FromScalar>::Scalar>>::StaticWp, T>: IntoCam16Unclamped<WpParam, Cam16Jsh<T>, Scalar = <T as FromScalar>::Scalar>,
T: FromScalar,
WpParam: WhitePointParameter<<T as FromScalar>::Scalar>,
Derive partial CIE CAM16 attributes with transparency, for the provided color, under the provided viewing conditions.
use palette::{Srgba, IntoColor, cam16::{Cam16Jsha, Parameters}};
// Customize these according to the viewing conditions:
let mut example_parameters = Parameters::default_static_wp(40.0);
let rgba = Srgba::new(0.3f32, 0.8, 0.1, 0.9);
let partial = Cam16Jsha::from_xyz(rgba.into_color(), example_parameters);
It’s also possible to “pre-bake” the parameters, to avoid recalculate some of the derived values when converting multiple color value.
use palette::{Srgba, IntoColor, cam16::{Cam16Jsha, Parameters}};
// Customize these according to the viewing conditions:
let mut example_parameters = Parameters::default_static_wp(40.0);
let baked_parameters = example_parameters.bake();
let rgba = Srgba::new(0.3f32, 0.8, 0.1, 0.9);
let partial = Cam16Jsha::from_xyz(rgba.into_color(), baked_parameters);
sourcepub fn into_xyz<WpParam>(
self,
parameters: impl Into<BakedParameters<WpParam, <T as FromScalar>::Scalar>>,
) -> Alpha<Xyz<<WpParam as WhitePointParameter<T>>::StaticWp, T>, A>where
Cam16Jsh<T>: Cam16IntoUnclamped<WpParam, Xyz<<WpParam as WhitePointParameter<T>>::StaticWp, T>, Scalar = <T as FromScalar>::Scalar>,
WpParam: WhitePointParameter<T>,
T: FromScalar,
pub fn into_xyz<WpParam>(
self,
parameters: impl Into<BakedParameters<WpParam, <T as FromScalar>::Scalar>>,
) -> Alpha<Xyz<<WpParam as WhitePointParameter<T>>::StaticWp, T>, A>where
Cam16Jsh<T>: Cam16IntoUnclamped<WpParam, Xyz<<WpParam as WhitePointParameter<T>>::StaticWp, T>, Scalar = <T as FromScalar>::Scalar>,
WpParam: WhitePointParameter<T>,
T: FromScalar,
Construct an XYZ color with transparency, from these CIE CAM16 attributes, under the provided viewing conditions.
use palette::{Srgba, FromColor, cam16::{Cam16Jsha, Parameters}};
// Customize these according to the viewing conditions:
let mut example_parameters = Parameters::default_static_wp(40.0);
let partial = Cam16Jsha::new(50.0f32, 80.0, 120.0, 0.9);
let rgba = Srgba::from_color(partial.into_xyz(example_parameters));
It’s also possible to “pre-bake” the parameters, to avoid recalculate some of the derived values when converting multiple color value.
use palette::{Srgba, FromColor, cam16::{Cam16Jsha, Parameters}};
// Customize these according to the viewing conditions:
let mut example_parameters = Parameters::default_static_wp(40.0);
let baked_parameters = example_parameters.bake();
let partial = Cam16Jsha::new(50.0f32, 80.0, 120.0, 0.9);
let rgba = Srgba::from_color(partial.into_xyz(baked_parameters));
sourcepub fn from_full(full: Alpha<Cam16<T>, A>) -> Alpha<Cam16Jsh<T>, A>
pub fn from_full(full: Alpha<Cam16<T>, A>) -> Alpha<Cam16Jsh<T>, A>
Create a partial set of CIE CAM16 attributes with transparency.
It’s also possible to use Cam16Jsha::from
or Cam16a::into
.
sourcepub fn into_full<WpParam>(
self,
parameters: impl Into<BakedParameters<WpParam, <T as FromScalar>::Scalar>>,
) -> Alpha<Cam16<T>, A>where
Cam16Jsh<T>: IntoCam16Unclamped<WpParam, Cam16<T>, Scalar = <T as FromScalar>::Scalar>,
WpParam: WhitePointParameter<T>,
T: FromScalar,
pub fn into_full<WpParam>(
self,
parameters: impl Into<BakedParameters<WpParam, <T as FromScalar>::Scalar>>,
) -> Alpha<Cam16<T>, A>where
Cam16Jsh<T>: IntoCam16Unclamped<WpParam, Cam16<T>, Scalar = <T as FromScalar>::Scalar>,
WpParam: WhitePointParameter<T>,
T: FromScalar,
Reconstruct a full set of CIE CAM16 attributes with transparency, using the original viewing conditions.
use palette::{Srgba, IntoColor, cam16::{Cam16a, Cam16Jsha, Parameters}};
use approx::assert_relative_eq;
// Customize these according to the viewing conditions:
let mut example_parameters = Parameters::default_static_wp(40.0);
// Optional, but saves some work:
let baked_parameters = example_parameters.bake();
let rgba = Srgba::new(0.3f64, 0.8, 0.1, 0.9);
let cam16a = Cam16a::from_xyz(rgba.into_color(), baked_parameters);
let partial = Cam16Jsha::from(cam16a);
let reconstructed = partial.into_full(baked_parameters);
assert_relative_eq!(cam16a, reconstructed, epsilon = 0.0000000000001);
source§impl<T, A> Alpha<Cam16Jsh<Vec<T>>, Vec<A>>
impl<T, A> Alpha<Cam16Jsh<Vec<T>>, Vec<A>>
sourcepub fn with_capacity(capacity: usize) -> Alpha<Cam16Jsh<Vec<T>>, Vec<A>>
pub fn with_capacity(capacity: usize) -> Alpha<Cam16Jsh<Vec<T>>, Vec<A>>
Create a struct of vectors with a minimum capacity. See Vec::with_capacity
for details.
sourcepub fn push(&mut self, value: Alpha<Cam16Jsh<T>, A>)
pub fn push(&mut self, value: Alpha<Cam16Jsh<T>, A>)
Push an additional color’s components onto the component vectors. See Vec::push
for details.
sourcepub fn pop(&mut self) -> Option<Alpha<Cam16Jsh<T>, A>>
pub fn pop(&mut self) -> Option<Alpha<Cam16Jsh<T>, A>>
Pop a color’s components from the component vectors. See Vec::pop
for details.
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clear the component vectors. See Vec::clear
for details.
Trait Implementations
source§impl<C, T> AbsDiffEq for Alpha<C, T>
impl<C, T> AbsDiffEq for Alpha<C, T>
source§fn default_epsilon() -> <Alpha<C, T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <Alpha<C, T> as AbsDiffEq>::Epsilon
source§fn abs_diff_eq(
&self,
other: &Alpha<C, T>,
epsilon: <T as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &Alpha<C, T>, epsilon: <T as AbsDiffEq>::Epsilon, ) -> bool
source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq
.source§impl<T, C> AddAssign<T> for Alpha<C, T>
impl<T, C> AddAssign<T> for Alpha<C, T>
source§fn add_assign(&mut self, c: T)
fn add_assign(&mut self, c: T)
+=
operation. Read moresource§impl<C, T> AddAssign for Alpha<C, T>
impl<C, T> AddAssign for Alpha<C, T>
source§fn add_assign(&mut self, other: Alpha<C, T>)
fn add_assign(&mut self, other: Alpha<C, T>)
+=
operation. Read moresource§impl<C, T, const N: usize> Blend for Alpha<C, T>where
C: Premultiply<Scalar = T> + StimulusColor + ArrayCast<Array = [T; N]> + Clone,
T: Real + Zero + One + MinMax + Clamp + Sqrt + Abs + Arithmetics + PartialCmp + Clone,
<T as HasBoolMask>::Mask: LazySelect<T>,
impl<C, T, const N: usize> Blend for Alpha<C, T>where
C: Premultiply<Scalar = T> + StimulusColor + ArrayCast<Array = [T; N]> + Clone,
T: Real + Zero + One + MinMax + Clamp + Sqrt + Abs + Arithmetics + PartialCmp + Clone,
<T as HasBoolMask>::Mask: LazySelect<T>,
source§fn multiply(self, other: Alpha<C, T>) -> Alpha<C, T>
fn multiply(self, other: Alpha<C, T>) -> Alpha<C, T>
self
with other
. This uses the alpha component to regulate
the effect, so it’s not just plain component wise multiplication.source§fn screen(self, other: Alpha<C, T>) -> Alpha<C, T>
fn screen(self, other: Alpha<C, T>) -> Alpha<C, T>
self
or other
.source§fn overlay(self, other: Alpha<C, T>) -> Alpha<C, T>
fn overlay(self, other: Alpha<C, T>) -> Alpha<C, T>
self
or other
if other is dark, or screen them if other
is light. This results in an S curve.source§fn darken(self, other: Alpha<C, T>) -> Alpha<C, T>
fn darken(self, other: Alpha<C, T>) -> Alpha<C, T>
self
and other
.source§fn lighten(self, other: Alpha<C, T>) -> Alpha<C, T>
fn lighten(self, other: Alpha<C, T>) -> Alpha<C, T>
self
and other
.source§fn dodge(self, other: Alpha<C, T>) -> Alpha<C, T>
fn dodge(self, other: Alpha<C, T>) -> Alpha<C, T>
other
to reflect self
. Results in other
if self
is
black.source§fn burn(self, other: Alpha<C, T>) -> Alpha<C, T>
fn burn(self, other: Alpha<C, T>) -> Alpha<C, T>
other
to reflect self
. Results in other
if self
is
white.source§fn hard_light(self, other: Alpha<C, T>) -> Alpha<C, T>
fn hard_light(self, other: Alpha<C, T>) -> Alpha<C, T>
self
or other
if other is dark, or screen them if self
is light. This is similar to overlay
, but depends on self
instead
of other
.source§fn soft_light(self, other: Alpha<C, T>) -> Alpha<C, T>
fn soft_light(self, other: Alpha<C, T>) -> Alpha<C, T>
other
if self
is light, or darken other
as if it’s burned
if self
is dark. The effect is increased if the components of self
is further from 0.5.source§fn difference(self, other: Alpha<C, T>) -> Alpha<C, T>
fn difference(self, other: Alpha<C, T>) -> Alpha<C, T>
self
and other
. It’s
basically abs(self - other)
, but regulated by the alpha component.source§impl<C> BlendWith for Alpha<C, <C as Premultiply>::Scalar>where
C: Premultiply,
impl<C> BlendWith for Alpha<C, <C as Premultiply>::Scalar>where
C: Premultiply,
source§fn blend_with<F>(
self,
destination: Alpha<C, <C as Premultiply>::Scalar>,
blend_function: F,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn blend_with<F>( self, destination: Alpha<C, <C as Premultiply>::Scalar>, blend_function: F, ) -> Alpha<C, <C as Premultiply>::Scalar>
destination
, using
blend_function
. Anything that implements BlendFunction
is
acceptable, including functions and closures. Read moresource§impl<C, T> ClampAssign for Alpha<C, T>
impl<C, T> ClampAssign for Alpha<C, T>
source§fn clamp_assign(&mut self)
fn clamp_assign(&mut self)
source§impl<C> Compose for Alpha<C, <C as Premultiply>::Scalar>
impl<C> Compose for Alpha<C, <C as Premultiply>::Scalar>
source§fn over(
self,
other: Alpha<C, <C as Premultiply>::Scalar>,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn over( self, other: Alpha<C, <C as Premultiply>::Scalar>, ) -> Alpha<C, <C as Premultiply>::Scalar>
self
over other
. This is the good old common alpha composition
equation.source§fn inside(
self,
other: Alpha<C, <C as Premultiply>::Scalar>,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn inside( self, other: Alpha<C, <C as Premultiply>::Scalar>, ) -> Alpha<C, <C as Premultiply>::Scalar>
self
that overlaps the visible parts of
other
.source§fn outside(
self,
other: Alpha<C, <C as Premultiply>::Scalar>,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn outside( self, other: Alpha<C, <C as Premultiply>::Scalar>, ) -> Alpha<C, <C as Premultiply>::Scalar>
self
that lies outside the visible parts of
other
.source§fn atop(
self,
other: Alpha<C, <C as Premultiply>::Scalar>,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn atop( self, other: Alpha<C, <C as Premultiply>::Scalar>, ) -> Alpha<C, <C as Premultiply>::Scalar>
self
over only the visible parts of other
.source§fn xor(
self,
other: Alpha<C, <C as Premultiply>::Scalar>,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn xor( self, other: Alpha<C, <C as Premultiply>::Scalar>, ) -> Alpha<C, <C as Premultiply>::Scalar>
self
or other
, where they do not overlap.source§fn plus(
self,
other: Alpha<C, <C as Premultiply>::Scalar>,
) -> Alpha<C, <C as Premultiply>::Scalar>
fn plus( self, other: Alpha<C, <C as Premultiply>::Scalar>, ) -> Alpha<C, <C as Premultiply>::Scalar>
self
and other
. This uses the alpha component to regulate the
effect, so it’s not just plain component wise addition.source§impl<'de, C, T> Deserialize<'de> for Alpha<C, T>where
C: Deserialize<'de>,
T: Deserialize<'de>,
impl<'de, C, T> Deserialize<'de> for Alpha<C, T>where
C: Deserialize<'de>,
T: Deserialize<'de>,
source§fn deserialize<D>(
deserializer: D,
) -> Result<Alpha<C, T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Alpha<C, T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl<T, C> DivAssign<T> for Alpha<C, T>
impl<T, C> DivAssign<T> for Alpha<C, T>
source§fn div_assign(&mut self, c: T)
fn div_assign(&mut self, c: T)
/=
operation. Read moresource§impl<C, T> DivAssign for Alpha<C, T>
impl<C, T> DivAssign for Alpha<C, T>
source§fn div_assign(&mut self, other: Alpha<C, T>)
fn div_assign(&mut self, other: Alpha<C, T>)
/=
operation. Read moresource§impl<Tc, Ta, C, A> Extend<Alpha<Tc, Ta>> for Alpha<C, A>
impl<Tc, Ta, C, A> Extend<Alpha<Tc, Ta>> for Alpha<C, A>
source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Alpha<Tc, Ta>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Alpha<Tc, Ta>>,
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<C> From<PreAlpha<C>> for Alpha<C, <C as Premultiply>::Scalar>where
C: Premultiply,
impl<C> From<PreAlpha<C>> for Alpha<C, <C as Premultiply>::Scalar>where
C: Premultiply,
source§impl<C1, C2, T> FromColorUnclamped<C1> for Alpha<C2, T>
impl<C1, C2, T> FromColorUnclamped<C1> for Alpha<C2, T>
source§fn from_color_unclamped(other: C1) -> Alpha<C2, T>
fn from_color_unclamped(other: C1) -> Alpha<C2, T>
source§impl<Tc, Ta, C, A> FromIterator<Alpha<Tc, Ta>> for Alpha<C, A>
impl<Tc, Ta, C, A> FromIterator<Alpha<Tc, Ta>> for Alpha<C, A>
source§impl<C, T> HasBoolMask for Alpha<C, T>
impl<C, T> HasBoolMask for Alpha<C, T>
source§type Mask = <C as HasBoolMask>::Mask
type Mask = <C as HasBoolMask>::Mask
Self
values.source§impl<'a, T> IntoIterator for Alpha<Cam16Jsh<&'a [T]>, &'a [T]>
impl<'a, T> IntoIterator for Alpha<Cam16Jsh<&'a [T]>, &'a [T]>
source§impl<'a, T> IntoIterator for Alpha<Cam16Jsh<&'a mut [T]>, &'a mut [T]>
impl<'a, T> IntoIterator for Alpha<Cam16Jsh<&'a mut [T]>, &'a mut [T]>
source§impl<T, const N: usize> IntoIterator for Alpha<Cam16Jsh<[T; N]>, [T; N]>
impl<T, const N: usize> IntoIterator for Alpha<Cam16Jsh<[T; N]>, [T; N]>
source§impl<'a, T> IntoIterator for Alpha<Cam16Jsh<Vec<T>>, Vec<T>>
impl<'a, T> IntoIterator for Alpha<Cam16Jsh<Vec<T>>, Vec<T>>
source§impl<C, T> IsWithinBounds for Alpha<C, T>where
C: IsWithinBounds,
T: Stimulus + PartialCmp<Mask = <C as HasBoolMask>::Mask> + IsWithinBounds,
<C as HasBoolMask>::Mask: BitAnd<Output = <C as HasBoolMask>::Mask>,
impl<C, T> IsWithinBounds for Alpha<C, T>where
C: IsWithinBounds,
T: Stimulus + PartialCmp<Mask = <C as HasBoolMask>::Mask> + IsWithinBounds,
<C as HasBoolMask>::Mask: BitAnd<Output = <C as HasBoolMask>::Mask>,
source§fn is_within_bounds(&self) -> <C as HasBoolMask>::Mask
fn is_within_bounds(&self) -> <C as HasBoolMask>::Mask
source§impl<C> Lighten for Alpha<C, <C as Lighten>::Scalar>where
C: Lighten,
impl<C> Lighten for Alpha<C, <C as Lighten>::Scalar>where
C: Lighten,
source§impl<C> LightenAssign for Alpha<C, <C as LightenAssign>::Scalar>where
C: LightenAssign,
impl<C> LightenAssign for Alpha<C, <C as LightenAssign>::Scalar>where
C: LightenAssign,
source§type Scalar = <C as LightenAssign>::Scalar
type Scalar = <C as LightenAssign>::Scalar
source§fn lighten_assign(&mut self, factor: <C as LightenAssign>::Scalar)
fn lighten_assign(&mut self, factor: <C as LightenAssign>::Scalar)
source§fn lighten_fixed_assign(&mut self, amount: <C as LightenAssign>::Scalar)
fn lighten_fixed_assign(&mut self, amount: <C as LightenAssign>::Scalar)
source§impl<T, C> MulAssign<T> for Alpha<C, T>
impl<T, C> MulAssign<T> for Alpha<C, T>
source§fn mul_assign(&mut self, c: T)
fn mul_assign(&mut self, c: T)
*=
operation. Read moresource§impl<C, T> MulAssign for Alpha<C, T>
impl<C, T> MulAssign for Alpha<C, T>
source§fn mul_assign(&mut self, other: Alpha<C, T>)
fn mul_assign(&mut self, other: Alpha<C, T>)
*=
operation. Read moresource§impl<C, T> RelativeEq for Alpha<C, T>where
C: RelativeEq<Epsilon = <T as AbsDiffEq>::Epsilon>,
T: RelativeEq,
<T as AbsDiffEq>::Epsilon: Clone,
impl<C, T> RelativeEq for Alpha<C, T>where
C: RelativeEq<Epsilon = <T as AbsDiffEq>::Epsilon>,
T: RelativeEq,
<T as AbsDiffEq>::Epsilon: Clone,
source§fn default_max_relative() -> <Alpha<C, T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <Alpha<C, T> as AbsDiffEq>::Epsilon
source§fn relative_eq(
&self,
other: &Alpha<C, T>,
epsilon: <Alpha<C, T> as AbsDiffEq>::Epsilon,
max_relative: <Alpha<C, T> as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &Alpha<C, T>, epsilon: <Alpha<C, T> as AbsDiffEq>::Epsilon, max_relative: <Alpha<C, T> as AbsDiffEq>::Epsilon, ) -> bool
source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq
.source§impl<C> Saturate for Alpha<C, <C as Saturate>::Scalar>where
C: Saturate,
impl<C> Saturate for Alpha<C, <C as Saturate>::Scalar>where
C: Saturate,
source§impl<C> SaturateAssign for Alpha<C, <C as SaturateAssign>::Scalar>where
C: SaturateAssign,
impl<C> SaturateAssign for Alpha<C, <C as SaturateAssign>::Scalar>where
C: SaturateAssign,
source§type Scalar = <C as SaturateAssign>::Scalar
type Scalar = <C as SaturateAssign>::Scalar
source§fn saturate_assign(&mut self, factor: <C as SaturateAssign>::Scalar)
fn saturate_assign(&mut self, factor: <C as SaturateAssign>::Scalar)
factor
, a value
ranging from 0.0
to 1.0
. Read moresource§fn saturate_fixed_assign(&mut self, amount: <C as SaturateAssign>::Scalar)
fn saturate_fixed_assign(&mut self, amount: <C as SaturateAssign>::Scalar)
source§impl<T, C> SaturatingAdd<T> for Alpha<C, T>
impl<T, C> SaturatingAdd<T> for Alpha<C, T>
source§type Output = Alpha<<C as SaturatingAdd<T>>::Output, <T as SaturatingAdd>::Output>
type Output = Alpha<<C as SaturatingAdd<T>>::Output, <T as SaturatingAdd>::Output>
source§fn saturating_add(self, c: T) -> <Alpha<C, T> as SaturatingAdd<T>>::Output
fn saturating_add(self, c: T) -> <Alpha<C, T> as SaturatingAdd<T>>::Output
self
and other
, but saturates instead of overflowing.source§impl<C, T> SaturatingAdd for Alpha<C, T>where
C: SaturatingAdd,
T: SaturatingAdd,
impl<C, T> SaturatingAdd for Alpha<C, T>where
C: SaturatingAdd,
T: SaturatingAdd,
source§type Output = Alpha<<C as SaturatingAdd>::Output, <T as SaturatingAdd>::Output>
type Output = Alpha<<C as SaturatingAdd>::Output, <T as SaturatingAdd>::Output>
source§fn saturating_add(
self,
other: Alpha<C, T>,
) -> <Alpha<C, T> as SaturatingAdd>::Output
fn saturating_add( self, other: Alpha<C, T>, ) -> <Alpha<C, T> as SaturatingAdd>::Output
self
and other
, but saturates instead of overflowing.source§impl<T, C> SaturatingSub<T> for Alpha<C, T>
impl<T, C> SaturatingSub<T> for Alpha<C, T>
source§type Output = Alpha<<C as SaturatingSub<T>>::Output, <T as SaturatingSub>::Output>
type Output = Alpha<<C as SaturatingSub<T>>::Output, <T as SaturatingSub>::Output>
source§fn saturating_sub(self, c: T) -> <Alpha<C, T> as SaturatingSub<T>>::Output
fn saturating_sub(self, c: T) -> <Alpha<C, T> as SaturatingSub<T>>::Output
self
and other
, but saturates instead of overflowing.source§impl<C, T> SaturatingSub for Alpha<C, T>where
C: SaturatingSub,
T: SaturatingSub,
impl<C, T> SaturatingSub for Alpha<C, T>where
C: SaturatingSub,
T: SaturatingSub,
source§type Output = Alpha<<C as SaturatingSub>::Output, <T as SaturatingSub>::Output>
type Output = Alpha<<C as SaturatingSub>::Output, <T as SaturatingSub>::Output>
source§fn saturating_sub(
self,
other: Alpha<C, T>,
) -> <Alpha<C, T> as SaturatingSub>::Output
fn saturating_sub( self, other: Alpha<C, T>, ) -> <Alpha<C, T> as SaturatingSub>::Output
self
and other
, but saturates instead of overflowing.source§impl<C, T> Serialize for Alpha<C, T>
impl<C, T> Serialize for Alpha<C, T>
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<C, T> ShiftHueAssign for Alpha<C, T>where
C: ShiftHueAssign,
impl<C, T> ShiftHueAssign for Alpha<C, T>where
C: ShiftHueAssign,
source§type Scalar = <C as ShiftHueAssign>::Scalar
type Scalar = <C as ShiftHueAssign>::Scalar
source§fn shift_hue_assign(&mut self, amount: <Alpha<C, T> as ShiftHueAssign>::Scalar)
fn shift_hue_assign(&mut self, amount: <Alpha<C, T> as ShiftHueAssign>::Scalar)
amount
.source§impl<T, C> SubAssign<T> for Alpha<C, T>
impl<T, C> SubAssign<T> for Alpha<C, T>
source§fn sub_assign(&mut self, c: T)
fn sub_assign(&mut self, c: T)
-=
operation. Read moresource§impl<C, T> SubAssign for Alpha<C, T>
impl<C, T> SubAssign for Alpha<C, T>
source§fn sub_assign(&mut self, other: Alpha<C, T>)
fn sub_assign(&mut self, other: Alpha<C, T>)
-=
operation. Read moresource§impl<C, T> UlpsEq for Alpha<C, T>
impl<C, T> UlpsEq for Alpha<C, T>
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
source§impl<C, A> WithAlpha<A> for Alpha<C, A>
impl<C, A> WithAlpha<A> for Alpha<C, A>
source§fn with_alpha(self, alpha: A) -> <Alpha<C, A> as WithAlpha<A>>::WithAlpha
fn with_alpha(self, alpha: A) -> <Alpha<C, A> as WithAlpha<A>>::WithAlpha
Self
already has a transparency, it is
overwritten. Read more