Skip to main content

sample_gradient_stops

Function sample_gradient_stops 

Source
pub fn sample_gradient_stops(stops: &GradientStops, t: f32) -> [f32; 4]
Expand description

Samples normalized stops using pad spread and premultiplied interpolation in the encoded-sRGB working space (see crate::working_rgba). At a duplicate offset the last duplicate wins, allowing a hard transition without division by zero.