Struct LinearGradient
Represents a linear gradient brush that transitions between colors along a straight line,
following the same behavior as the HTML5 Canvas createLinearGradient().
public ref struct LinearGradient
  - Inherited Members
 
Constructors
LinearGradient(Point, Point, ReadOnlySpan<GradientStop>)
Creates a new LinearGradient with the given start and end points and gradient stops.
public LinearGradient(Point start, Point end, ReadOnlySpan<GradientStop> gradient)
  Parameters
startPointThe start point of the gradient.
endPointThe end point of the gradient.
gradientReadOnlySpan<GradientStop>A span of gradient stops sorted by offset.
Fields
EndPoint
The ending point of the gradient, in user space coordinates.
public Point EndPoint
  Field Value
GradientStops
The sequence of gradient stops that define color transitions along the line. Offsets are typically in the range [0, 1].
public ReadOnlySpan<GradientStop> GradientStops
  Field Value
StartPoint
The starting point of the gradient, in user space coordinates.
public Point StartPoint