LinearGradientPaint Class

A linear gradient, between two points in the coordinates of the shape it paints.

public sealed class LinearGradientPaint : ScenePaint
Inheritance
ScenePaint LinearGradientPaint

Constructors

NameDescription
LinearGradientPaint(double, double, double, double, IEnumerable<SceneGradientStop>)Initializes a new instance of the LinearGradientPaint class.

LinearGradientPaint(double, double, double, double, IEnumerable<SceneGradientStop>)

LinearGradientPaint.cs

Initializes a new instance of the LinearGradientPaint class.

public LinearGradientPaint(double x1, double y1, double x2, double y2, IEnumerable<SceneGradientStop> stops)

Parameters

x1 double
The x coordinate of the start of the gradient.
y1 double
The y coordinate of the start of the gradient.
x2 double
The x coordinate of the end of the gradient.
y2 double
The y coordinate of the end of the gradient.
stops IEnumerable<SceneGradientStop>
The color stops, by increasing offset.

Properties

NameDescription
StopsGets the color stops.
X1Gets the x coordinate of the start of the gradient.
X2Gets the x coordinate of the end of the gradient.
Y1Gets the y coordinate of the start of the gradient.
Y2Gets the y coordinate of the end of the gradient.

Gets the color stops.

public IReadOnlyList<SceneGradientStop> Stops { get; }

Gets the x coordinate of the start of the gradient.

public double X1 { get; }

Property value

double

Gets the x coordinate of the end of the gradient.

public double X2 { get; }

Property value

double

Gets the y coordinate of the start of the gradient.

public double Y1 { get; }

Property value

double

Gets the y coordinate of the end of the gradient.

public double Y2 { get; }

Property value

double