Skip to main content

two_point_conical_gradient

Function two_point_conical_gradient 

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

Returns a shader that generates a conical gradient given two circles.

The gradient interprets the two circles according to the following HTML spec: http://dev.w3.org/html5/2dcontext/#dom-context-2d-createradialgradient

  • start The center of the start circle
  • start_radius Must be positive. The radius of the start circle
  • end The center of the end circle
  • end_radius Must be positive. The radius of the end circle
  • gradient Description of the colors and interpolation method
  • local_matrix Optional local matrix