pub struct UnpremultipliedInterpolator {
color1: [f32; 3],
alpha1: f32,
delta_color: [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_unpremultiplied.
Fields§
§color1: [f32; 3]§alpha1: f32§delta_color: [f32; 3]§delta_alpha: f32§cs: ColorSpaceTag§missing: MissingImplementations§
Source§impl UnpremultipliedInterpolator
impl UnpremultipliedInterpolator
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 UnpremultipliedInterpolator
impl Clone for UnpremultipliedInterpolator
Source§fn clone(&self) -> UnpremultipliedInterpolator
fn clone(&self) -> UnpremultipliedInterpolator
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 UnpremultipliedInterpolator
Auto Trait Implementations§
impl Freeze for UnpremultipliedInterpolator
impl RefUnwindSafe for UnpremultipliedInterpolator
impl Send for UnpremultipliedInterpolator
impl Sync for UnpremultipliedInterpolator
impl Unpin for UnpremultipliedInterpolator
impl UnwindSafe for UnpremultipliedInterpolator
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