Class LinearGradientBrush

LinearGradientBrush class

Encapsulates a Brush with a linear gradient. This class cannot be inherited.

public sealed class LinearGradientBrush : Brush

Constructors

NameDescription
LinearGradientBrush(Point, Point, Color, Color)Initializes a new instance of the LinearGradientBrush class with the specified points and colors.
LinearGradientBrush(PointF, PointF, Color, Color)Initializes a new instance of the LinearGradientBrush class with the specified points and colors.
LinearGradientBrush(Rectangle, Color, Color, float)Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.
LinearGradientBrush(Rectangle, Color, Color, LinearGradientMode)Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and orientation.
LinearGradientBrush(RectangleF, Color, Color, float)Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.
LinearGradientBrush(RectangleF, Color, Color, LinearGradientMode)Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation mode.
LinearGradientBrush(Rectangle, Color, Color, float, bool)Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.
LinearGradientBrush(RectangleF, Color, Color, float, bool)Initializes a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

Properties

NameDescription
Blend { get; set; }Gets or sets a Blend that specifies positions and factors that define a custom falloff for the gradient.
GammaCorrection { get; set; }Gets or sets a value indicating whether gamma correction is enabled for this LinearGradientBrush.
InterpolationColors { get; set; }Gets or sets a ColorBlend that defines a multicolor linear gradient.
LinearColors { get; set; }Gets or sets the starting and ending colors of the gradient.
Rectangle { get; }Gets a rectangular region that defines the starting and ending points of the gradient.
Transform { get; set; }Gets or sets a copy Matrix that defines a local geometric transform for this LinearGradientBrush.
WrapMode { get; set; }Gets or sets a WrapMode enumeration that indicates the wrap mode for this LinearGradientBrush.

Methods

NameDescription
override Clone()Creates an exact copy of this LinearGradientBrush.
Dispose()Releases all resources used by this Brush object.
MultiplyTransform(Matrix)Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix by prepending the specified Matrix.
MultiplyTransform(Matrix, MatrixOrder)Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix in the specified order.
ResetTransform()Resets the Transform property to identity.
RotateTransform(float)Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
RotateTransform(float, MatrixOrder)Rotates the local geometric transform by the specified amount in the specified order.
ScaleTransform(float, float)Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
ScaleTransform(float, float, MatrixOrder)Scales the local geometric transform by the specified amounts in the specified order.
SetBlendTriangularShape(float)Creates a linear gradient with a center color and a linear falloff to a single color on both ends.
SetBlendTriangularShape(float, float)Creates a linear gradient with a center color and a linear falloff to a single color on both ends.
SetSigmaBellShape(float)Creates a gradient falloff based on a bell-shaped curve.
SetSigmaBellShape(float, float)Creates a gradient falloff based on a bell-shaped curve.
TranslateTransform(float, float)Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.
TranslateTransform(float, float, MatrixOrder)Translates the local geometric transform by the specified dimensions in the specified order.

See Also