Function validate

Source
fn validate(gradient: &Gradient) -> Result<(), Paint>
Expand description

Returns a fallback paint in case the gradient is invalid.

The paint will be either black or contain the color of the first stop of the gradient.