sweep_gradient

Function sweep_gradient 

pub fn sweep_gradient<'a>(
    center: impl Into<Point>,
    _: (f32, f32),
    gradient: &Gradient<'_>,
    local_matrix: impl Into<Option<&'a Matrix>>,
) -> Option<RCHandle<SkShader>>
Expand description

Returns a shader that generates a sweep gradient given a center.

The shader accepts negative angles and angles larger than 360, draws between 0 and 360 degrees, similar to the CSS conic-gradient semantics. 0 degrees means horizontal positive x axis. The start angle must be less than the end angle.

  • center: The center of the sweep
  • start_angle: Start of the angular range, corresponding to pos == 0
  • end_angle: End of the angular range, corresponding to pos == 1
  • gradient: Description of the colors and interpolation method
  • local_matrix: Optional local matrix