<PackageReference Include="System.Drawing.Common" Version="8.0.4" />

LinearGradientBrush

public sealed class LinearGradientBrush : Brush
Encapsulates a Brush with a linear gradient. This class cannot be inherited.
public Blend Blend { get; set; }

Gets or sets a Blend that specifies positions and factors that define a custom falloff for the gradient.

public bool GammaCorrection { get; set; }

Gets or sets a value indicating whether gamma correction is enabled for this LinearGradientBrush.

public ColorBlend InterpolationColors { get; set; }

Gets or sets a ColorBlend that defines a multicolor linear gradient.

public Color[] LinearColors { get; set; }

Gets or sets the starting and ending colors of the gradient.

public RectangleF Rectangle { get; }

Gets a rectangular region that defines the starting and ending points of the gradient.

public Matrix Transform { get; set; }

Gets or sets a copy Matrix that defines a local geometric transform for this LinearGradientBrush.

public WrapMode WrapMode { get; set; }

Gets or sets a WrapMode enumeration that indicates the wrap mode for this LinearGradientBrush.

public LinearGradientBrush(Point point1, Point point2, Color color1, Color color2)

Initializes a new instance of the LinearGradientBrush class with the specified points and colors.

public LinearGradientBrush(PointF point1, PointF point2, Color color1, Color color2)

Initializes a new instance of the LinearGradientBrush class with the specified points and colors.

public LinearGradientBrush(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)

Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and orientation.

public LinearGradientBrush(Rectangle rect, Color color1, Color color2, float angle)

Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable)

Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(RectangleF rect, Color color1, Color color2, LinearGradientMode linearGradientMode)

Creates a new instance of the LinearGradientBrush based on a rectangle, starting and ending colors, and an orientation mode.

public LinearGradientBrush(RectangleF rect, Color color1, Color color2, float angle)

Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public LinearGradientBrush(RectangleF rect, Color color1, Color color2, float angle, bool isAngleScaleable)

Creates a new instance of the LinearGradientBrush class based on a rectangle, starting and ending colors, and an orientation angle.

public void MultiplyTransform(Matrix matrix)

Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix by prepending the specified Matrix.

public void MultiplyTransform(Matrix matrix, MatrixOrder order)

Multiplies the Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Matrix in the specified order.

public void ResetTransform()

Resets the Transform property to identity.

public void RotateTransform(float angle)

Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.

public void RotateTransform(float angle, MatrixOrder order)

Rotates the local geometric transform by the specified amount in the specified order.

public void ScaleTransform(float sx, float sy)

Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.

public void ScaleTransform(float sx, float sy, MatrixOrder order)

Scales the local geometric transform by the specified amounts in the specified order.

public void SetBlendTriangularShape(float focus)

Creates a linear gradient with a center color and a linear falloff to a single color on both ends.

public void SetBlendTriangularShape(float focus, float scale)

Creates a linear gradient with a center color and a linear falloff to a single color on both ends.

public void SetSigmaBellShape(float focus)

Creates a gradient falloff based on a bell-shaped curve.

public void SetSigmaBellShape(float focus, float scale)

Creates a gradient falloff based on a bell-shaped curve.

public void TranslateTransform(float dx, float dy)

Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.

public void TranslateTransform(float dx, float dy, MatrixOrder order)

Translates the local geometric transform by the specified dimensions in the specified order.