Skip to main content

radial_gradient

Function radial_gradient 

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

Returns a shader that generates a radial gradient given the center and radius.

  • center The center of the circle for this gradient
  • radius Must be positive. The radius of the circle for this gradient
  • gradient Description of the colors and interpolation method
  • local_matrix Optional local matrix