Trait nannou::color::ComponentWise
source · pub trait ComponentWise {
type Scalar;
// Required methods
fn component_wise<F>(&self, other: &Self, f: F) -> Self
where F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar;
fn component_wise_self<F>(&self, f: F) -> Self
where F: FnMut(Self::Scalar) -> Self::Scalar;
}
Expand description
Perform a unary or binary operation on each component of a color.
Required Associated Types§
Required Methods§
sourcefn component_wise<F>(&self, other: &Self, f: F) -> Self
fn component_wise<F>(&self, other: &Self, f: F) -> Self
Perform a binary operation on this and an other color.
sourcefn component_wise_self<F>(&self, f: F) -> Self
fn component_wise_self<F>(&self, f: F) -> Self
Perform a unary operation on this color.
Object Safety§
This trait is not object safe.