pub trait Interpolate {
    fn fill_missing_components(&mut self, other: &Self);
    fn premultiply(&mut self);
    fn unpremultiply(&mut self, alpha_multiplier: f32);
    fn interpolate(&self, p1: f32, other: &Self, p2: f32) -> Self;

    fn adjust_powerless_components(&mut self) { ... }
    fn adjust_hue(&mut self, _: &mut Self, _: HueInterpolationMethod) { ... }
}
Expand description

A trait that colors implement to support interpolation.

Required Methods

Fills missing components (represented as NaN) to match the other color to interpolate with.

Premultiplies the color by its alpha value.

Un-premultiplies the color by the given alpha multiplier.

Interpolates the color with another using the given amounts of each.

Provided Methods

Adjusts components that are powerless to be NaN.

Adjusts the color hue according to the given hue interpolation method.

Implementors