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
start
PointThe start point of the gradient.
end
PointThe end point of the gradient.
gradient
ReadOnlySpan<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