Skip to content

GeoLinearGradientBrush

Namespace: ThinkGeo.Core

Encapsulates a GeoBrush with a linear gradient.

public class GeoLinearGradientBrush : GeoBrush

Inheritance ObjectGeoBrushGeoLinearGradientBrush

Remarks:

This class encapsulates both two-color gradients and custom multicolor gradients.

All linear gradients are defined along a line specified either by the width of a rectangle or by two points.

By default, a two-color linear gradient is an even horizontal linear blend from the starting color to the ending color along the specified line.

Properties

StartColor

Gets or sets the starting GeoColor of the gradient.

public GeoColor StartColor { get; set; }

Property Value

GeoColor

EndColor

Gets or sets the ending GeoColor of the gradient.

public GeoColor EndColor { get; set; }

Property Value

GeoColor

DirectionAngle

Gets or sets the Direction angle of the GeoLinearGradientBrush.

public float DirectionAngle { get; set; }

Property Value

Single

WrapMode

Gets or sets a GeoWrapMode enumeration that indicates the wrap mode for the GeoLinearGradientBrush.

public GeoBrushWrapMode WrapMode { get; set; }

Property Value

GeoBrushWrapMode

Id

The id of the GeoBrush. This is always used as a key when in the cached brushes.

public long Id { get; }

Property Value

Int64

Constructors

GeoLinearGradientBrush(GeoColor, GeoColor, GeoLinearGradientDirection)

Create an instance of GeoLinearGradientBrush by passing a gradient start color and gradient end color followed by the gradient direction enum.

public GeoLinearGradientBrush(GeoColor startColor, GeoColor endColor, GeoLinearGradientDirection direction)

Parameters

startColor GeoColor

        This parameter specifies the starting GeoColor of the
        GeoLinearGradientBrush.

endColor GeoColor

        This parameter specifies the endding GeoColor of the
        GeoLinearGradientBrush.

direction GeoLinearGradientDirection

        This parameter specifies the GeoLinearGradientDirection
        enumeration of the GeoLinearGradientBrush.

GeoLinearGradientBrush(GeoColor, GeoColor, Single)

Create an instance of GeoLinearGradientBrush by passing a gradient start color and gradient end color followed by the gradient direction angle.

public GeoLinearGradientBrush(GeoColor startColor, GeoColor endColor, float directionAngle)

Parameters

startColor GeoColor

        This parameter specifies the starting GeoColor of the
        GeoLinearGradientBrush.

endColor GeoColor

        This parameter specifies the endding GeoColor of the
        GeoLinearGradientBrush.

directionAngle Single

        This parameter specifies the direction angle value of the
        GeoLinearGradientBrush.