Class LinearGradient
- Namespace
- SimulationFramework.Drawing
- Assembly
- SimulationFramework.dll
Represents a linear gradient.
public sealed class LinearGradient : Gradient
- Inheritance
-
LinearGradient
- Inherited Members
Constructors
LinearGradient(Vector2, Vector2, params Color[])
Creates a new instance of the LinearGradient class.
public LinearGradient(Vector2 from, Vector2 to, params Color[] colors)
Parameters
from
Vector2The starting point of the gradient.
to
Vector2The end point of the gradient.
colors
Color[]An array of colors.
LinearGradient(Vector2, Vector2, Color[], Matrix3x2, TileMode)
Creates a new instance of the LinearGradient class.
public LinearGradient(Vector2 from, Vector2 to, Color[] colors, Matrix3x2 transform, TileMode tileMode = TileMode.Clamp)
Parameters
from
Vector2The starting point of the gradient.
to
Vector2The end point of the gradient.
colors
Color[]An array of colors.
transform
Matrix3x2The gradient's transformation matrix.
tileMode
TileModeThe gradients tile mode.
LinearGradient(Vector2, Vector2, params GradientStop[])
Creates a new instance of the LinearGradient class.
public LinearGradient(Vector2 from, Vector2 to, params GradientStop[] stops)
Parameters
from
Vector2The starting point of the gradient.
to
Vector2The end point of the gradient.
stops
GradientStop[]An array of gradient stops.
LinearGradient(Vector2, Vector2, GradientStop[], Matrix3x2, TileMode)
Creates a new instance of the LinearGradient class.
public LinearGradient(Vector2 from, Vector2 to, GradientStop[] stops, Matrix3x2 transform, TileMode tileMode = TileMode.Clamp)
Parameters
from
Vector2The starting point of the gradient.
to
Vector2The end point of the gradient.
stops
GradientStop[]An array of gradient stops.
transform
Matrix3x2The gradient's transformation matrix.
tileMode
TileModeThe gradients tile mode.
LinearGradient(float, float, float, float, params Color[])
Creates a new instance of the LinearGradient class.
public LinearGradient(float fromX, float fromY, float toX, float toY, params Color[] colors)
Parameters
fromX
floatThe X coordinate of the gradient's starting point.
fromY
floatThe Y coordinate of the gradient's starting point.
toX
floatThe X coordinate of the gradient's end point.
toY
floatThe Y coordinate of the gradient's end point.
colors
Color[]An array of colors.
LinearGradient(float, float, float, float, params GradientStop[])
Creates a new instance of the LinearGradient class.
public LinearGradient(float fromX, float fromY, float toX, float toY, params GradientStop[] stops)
Parameters
fromX
floatThe X coordinate of the gradient's starting point.
fromY
floatThe Y coordinate of the gradient's starting point.
toX
floatThe X coordinate of the gradient's end point.
toY
floatThe Y coordinate of the gradient's end point.
stops
GradientStop[]An array of gradient stops.
Properties
From
The gradients starting point.
public Vector2 From { get; set; }
Property Value
To
The gradient's end point.
public Vector2 To { get; set; }