pub struct Interpolator {
premul1: [f32; 3],
alpha1: f32,
delta_premul: [f32; 3],
delta_alpha: f32,
cs: ColorSpaceTag,
missing: Missing,
}
Expand description
An intermediate struct used for interpolating between colors.
This is the return value of DynamicColor::interpolate
.
Fields§
§premul1: [f32; 3]
§alpha1: f32
§delta_premul: [f32; 3]
§delta_alpha: f32
§cs: ColorSpaceTag
§missing: Missing
Implementations§
Source§impl Interpolator
impl Interpolator
Sourcepub fn eval(&self, t: f32) -> DynamicColor
pub fn eval(&self, t: f32) -> DynamicColor
Evaluate the color ramp at the given point.
Typically t
ranges between 0 and 1, but that is not enforced,
so extrapolation is also possible.
Trait Implementations§
Source§impl Clone for Interpolator
impl Clone for Interpolator
Source§fn clone(&self) -> Interpolator
fn clone(&self) -> Interpolator
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 moreimpl Copy for Interpolator
Auto Trait Implementations§
impl Freeze for Interpolator
impl RefUnwindSafe for Interpolator
impl Send for Interpolator
impl Sync for Interpolator
impl Unpin for Interpolator
impl UnwindSafe for Interpolator
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