Skip to main content

PathGradientBrush

Namespace: System.Drawing.Drawing2D

Assembly: System.Drawing.Managed (4.0.0.0)

Encapsulates a Brush object that fills the interior of a GraphicsPath object with a gradient. This class cannot be inherited.

public class PathGradientBrush : Brush

Constructors

Instance member PathGradientBrush(points)

Initializes a new instance of the PathGradientBrush class with the specified points.

NameTypeDescription
pointsPointF[]An array of PointF structures that represents the points that make up the vertices of the path.

Instance member PathGradientBrush(points)

Initializes a new instance of the PathGradientBrush class with the specified points.

NameTypeDescription
pointsPoint[]An array of Point structures that represents the points that make up the vertices of the path.

Instance member PathGradientBrush(points, wrapMode)

Initializes a new instance of the PathGradientBrush class with the specified wrap mode.

NameTypeDescription
pointsPointF[]An array of PointF structures that represents the points that make up the vertices of the path.
wrapModeWrapModeA WrapMode that specifies how fills drawn with this PathGradientBrush are tiled.

Instance member PathGradientBrush(points, wrapMode)

Initializes a new instance of the PathGradientBrush class with the specified wrap mode.

NameTypeDescription
pointsPoint[]An array of Point structures that represents the points that make up the vertices of the path.
wrapModeWrapModeA WrapMode that specifies how fills drawn with this PathGradientBrush are tiled.

Instance member PathGradientBrush(path)

Initializes a new instance of the PathGradientBrush class with the specified path.

NameTypeDescription
pathGraphicsPathThe GraphicsPath that defines the area filled by this PathGradientBrush.

Properties

Instance member Blend

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

Instance member CenterColor

Color: Gets or sets the color at the center of the path gradient.

Instance member CenterPoint

PointF: Gets or sets the center point of the path gradient.

Instance member FocusScales

PointF: Gets or sets the focus point for the gradient falloff.

Instance member InterpolationColors

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

Instance member Rectangle

RectangleF: Gets a bounding rectangle for this PathGradientBrush.

Instance member SurroundColors

Color[]: Gets or sets an array of colors that correspond to the points in the path this PathGradientBrush fills.

Instance member Transform

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

Instance member WrapMode

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

Methods

Instance member Clone()

Creates an exact copy of this PathGradientBrush.

Returns: Object. The PathGradientBrush this method creates, cast as an object.

Instance member MultiplyTransform(matrix)

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

ParameterTypeDescription
matrixMatrixThe Matrix by which to multiply the geometric transform.

Instance member MultiplyTransform(matrix, order)

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

ParameterTypeDescription
matrixMatrixThe Matrix by which to multiply the geometric transform.
orderMatrixOrderA MatrixOrder that specifies in which order to multiply the two matrices.

Instance member ResetTransform()

Resets the Transform property to identity.

Instance member RotateTransform(angle)

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

ParameterTypeDescription
angleSingleThe angle of rotation.

Instance member RotateTransform(angle, order)

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

ParameterTypeDescription
angleSingleThe angle of rotation.
orderMatrixOrderA MatrixOrder that specifies whether to append or prepend the rotation matrix.

Instance member ScaleTransform(sx, sy)

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

ParameterTypeDescription
sxSingleThe amount by which to scale the transform in the x-axis direction.
sySingleThe amount by which to scale the transform in the y-axis direction.

Instance member ScaleTransform(sx, sy, order)

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

ParameterTypeDescription
sxSingleThe amount by which to scale the transform in the x-axis direction.
sySingleThe amount by which to scale the transform in the y-axis direction.
orderMatrixOrderA MatrixOrder that specifies whether to append or prepend the scaling matrix.

Instance member SetBlendTriangularShape(focus)

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

ParameterTypeDescription
focusSingleA value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color).

Instance member SetBlendTriangularShape(focus, scale)

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

ParameterTypeDescription
focusSingleA value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color).
scaleSingleA value from 0 through1 that specifies how fast the colors falloff from the starting color to focus (ending color)

Instance member SetSigmaBellShape(focus)

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

ParameterTypeDescription
focusSingleA value from 0 through 1 that specifies the center of the gradient (the point where the starting color and ending color are blended equally).

Instance member SetSigmaBellShape(focus, scale)

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

ParameterTypeDescription
focusSingleA value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color).
scaleSingleA value from 0 through 1 that specifies how fast the colors falloff from the focus .

Instance member TranslateTransform(dx, dy)

Translates the local geometric transformation of this TextureBrush object by the specified dimensions. This method prepends the translation to the transformation.

ParameterTypeDescription
dxSingleThe dimension by which to translate the transformation in the x direction.
dySingleThe dimension by which to translate the transformation in the y direction.

Instance member TranslateTransform(dx, dy, order)

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

ParameterTypeDescription
dxSingleThe value of the translation in x.
dySingleThe value of the translation in y.
orderMatrixOrderThe order (prepend or append) in which to apply the translation.