Skip to main content

sample_paint

Function sample_paint 

Source
pub fn sample_paint(animation: &Animated<Paint>, time: MediaTime) -> Paint
Expand description

Samples an animated paint. Colors interpolate premultiplied, as effect colors do, and gradient points, radii, angles, and stop offsets numerically; offsets are then kept in order within 0..=1 and a radius positive, as an overshooting curve could carry them past. Validation keeps the keyframes alike in kind, stops, and spread; were they not, the left keyframe’s paint is held.