Table of Contents

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 Vector2

The starting point of the gradient.

to Vector2

The 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 Vector2

The starting point of the gradient.

to Vector2

The end point of the gradient.

colors Color[]

An array of colors.

transform Matrix3x2

The gradient's transformation matrix.

tileMode TileMode

The 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 Vector2

The starting point of the gradient.

to Vector2

The 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 Vector2

The starting point of the gradient.

to Vector2

The end point of the gradient.

stops GradientStop[]

An array of gradient stops.

transform Matrix3x2

The gradient's transformation matrix.

tileMode TileMode

The 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 float

The X coordinate of the gradient's starting point.

fromY float

The Y coordinate of the gradient's starting point.

toX float

The X coordinate of the gradient's end point.

toY float

The 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 float

The X coordinate of the gradient's starting point.

fromY float

The Y coordinate of the gradient's starting point.

toX float

The X coordinate of the gradient's end point.

toY float

The 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

Vector2

To

The gradient's end point.

public Vector2 To { get; set; }

Property Value

Vector2