Skip to main content

try_linear_gradient

Function try_linear_gradient 

Source
pub fn try_linear_gradient(
    output: &str,
    width: u32,
    height: u32,
    angle_deg: f32,
    stops: &[ColorStop],
) -> Result<Program, String>
Expand description

Fallible linear-gradient builder.

ยงErrors

Returns an error when the stop count is outside the supported 2..=16 interval.