linear_gradient

Function linear_gradient 

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

Returns a shader that generates a linear gradient between the two specified points.

  • points: Array of 2 points, the end-points of the line segment
  • gradient: Description of the colors and interpolation method
  • local_matrix: Optional local matrix