Skip to main content

LinearGradientBrush Class

NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Media

A brush that paints a region with a linear color gradient.

public sealed class LinearGradientBrush : Brush

Constructors​

LinearGradientBrush(Color startColor, Color endColor)​

public LinearGradientBrush(Color startColor, Color endColor) : this(startColor, endColor, 0, 0, RelativeBoundingBoxSize, RelativeBoundingBoxSize)

Creates a gradient brush spanning the painted region.

LinearGradientBrush(Color startColor, Color endColor, int startX, int startY, int endX, int endY)​

public LinearGradientBrush(Color startColor, Color endColor, int startX, int startY, int endX, int endY)

Creates a gradient brush with the given start and end coordinates.

Fields​

StartColor​

public Color StartColor

The color at the start of the gradient.

EndColor​

public Color EndColor

The color at the end of the gradient.

MappingMode​

public BrushMappingMode MappingMode

How the gradient start and end coordinates are interpreted.

StartY​

public int StartX, StartY

The start coordinates of the gradient.

EndY​

public int EndX, EndY

The end coordinates of the gradient.

RelativeBoundingBoxSize​

public const int RelativeBoundingBoxSize

The coordinate range used for relative gradient mapping.