> For the complete documentation index, see [llms.txt](https://docs.wisej.com/system.drawing.managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md).

# PathGradientBrush

Namespace: **System.Drawing.Drawing2D**

Assembly: **System.Drawing.Managed** (4.0.0.0)

Encapsulates a [Brush](/system.drawing.managed/api/system.drawing/system.drawing.brush.md) object that fills the interior of a [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) object with a gradient. This class cannot be inherited.

{% tabs %}
{% tab title="C#" %}

```csharp
public class PathGradientBrush : Brush
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class PathGradientBrush
    Inherits Brush
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathGradientBrush(points)

Initializes a new instance of the [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) class with the specified points.

| Name       | Type                                                                      | Description                                                                                                                                                    |
| ---------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that make up the vertices of the path. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathGradientBrush(points)

Initializes a new instance of the [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) class with the specified points.

| Name       | Type                                                                    | Description                                                                                                                                                  |
| ---------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **points** | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that make up the vertices of the path. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathGradientBrush(points, wrapMode)

Initializes a new instance of the [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) class with the specified wrap mode.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                         |
| ------------ | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**   | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf)                             | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that make up the vertices of the path.                                      |
| **wrapMode** | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | A [WrapMode](#wrapmode) that specifies how fills drawn with this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) are tiled. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathGradientBrush(points, wrapMode)

Initializes a new instance of the [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) class with the specified wrap mode.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                         |
| ------------ | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**   | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point)                               | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that make up the vertices of the path.                                        |
| **wrapMode** | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | A [WrapMode](#wrapmode) that specifies how fills drawn with this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) are tiled. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathGradientBrush(path)

Initializes a new instance of the [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) class with the specified path.

| Name     | Type                                                                                                          | Description                                                                                                                                                                                                                                                                     |
| -------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **path** | [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) | The [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) that defines the area filled by this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md). |

## Properties

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Blend

[Blend](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.blend.md): Gets or sets a [Blend](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.blend.md) that specifies positions and factors that define a custom falloff for the gradient.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) CenterColor

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Gets or sets the color at the center of the path gradient.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) CenterPoint

[PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf): Gets or sets the center point of the path gradient.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) FocusScales

[PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf): Gets or sets the focus point for the gradient falloff.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) InterpolationColors

[ColorBlend](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.colorblend.md): Gets or sets a [ColorBlend](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.colorblend.md) that defines a multicolor linear gradient.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Rectangle

[RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef): Gets a bounding rectangle for this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SurroundColors

[Color\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.color): Gets or sets an array of colors that correspond to the points in the path this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) fills.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Transform

[Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md): Gets or sets a copy [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that defines a local geometric transform for this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) WrapMode

[WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md): Gets or sets a [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) enumeration that indicates the wrap mode for this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md).

## Methods

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Clone()

Creates an exact copy of this [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md).

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The [PathGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md) this method creates, cast as an object.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) MultiplyTransform(matrix)

Multiplies the [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that represents the local geometric transform of this [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) by the specified [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) by prepending the specified [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md).

| Parameter  | Type                                                                                              | Description                                                                                                                                         |
| ---------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | The [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) by which to multiply the geometric transform. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) MultiplyTransform(matrix, order)

Multiplies the [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that represents the local geometric transform of this [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) by the specified [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) in the specified order.

| Parameter  | Type                                                                                                        | Description                                                                                                                                                               |
| ---------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md)           | The [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) by which to multiply the geometric transform.                       |
| **order**  | [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) | A [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) that specifies in which order to multiply the two matrices. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ResetTransform()

Resets the [Transform](#transform) property to identity.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) RotateTransform(angle)

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

| Parameter | Type                                                          | Description            |
| --------- | ------------------------------------------------------------- | ---------------------- |
| **angle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The angle of rotation. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) RotateTransform(angle, order)

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

| Parameter | Type                                                                                                        | Description                                                                                                                                                                    |
| --------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **angle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                               | The angle of rotation.                                                                                                                                                         |
| **order** | [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) | A [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) that specifies whether to append or prepend the rotation matrix. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ScaleTransform(sx, sy)

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

| Parameter | Type                                                          | Description                                                         |
| --------- | ------------------------------------------------------------- | ------------------------------------------------------------------- |
| **sx**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The amount by which to scale the transform in the x-axis direction. |
| **sy**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The amount by which to scale the transform in the y-axis direction. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ScaleTransform(sx, sy, order)

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

| Parameter | Type                                                                                                        | Description                                                                                                                                                                   |
| --------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **sx**    | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                               | The amount by which to scale the transform in the x-axis direction.                                                                                                           |
| **sy**    | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                               | The amount by which to scale the transform in the y-axis direction.                                                                                                           |
| **order** | [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) | A [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) that specifies whether to append or prepend the scaling matrix. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetBlendTriangularShape(focus)

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

| Parameter | Type                                                          | Description                                                                                                                             |
| --------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **focus** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color). |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetBlendTriangularShape(focus, scale)

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

| Parameter | Type                                                          | Description                                                                                                                             |
| --------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **focus** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color). |
| **scale** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A value from 0 through1 that specifies how fast the colors falloff from the starting color to *focus* (ending color)                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetSigmaBellShape(focus)

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

| Parameter | Type                                                          | Description                                                                                                                                   |
| --------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **focus** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A value from 0 through 1 that specifies the center of the gradient (the point where the starting color and ending color are blended equally). |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetSigmaBellShape(focus, scale)

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

| Parameter | Type                                                          | Description                                                                                                                             |
| --------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **focus** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color). |
| **scale** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | A value from 0 through 1 that specifies how fast the colors falloff from the *focus* .                                                  |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TranslateTransform(dx, dy)

Translates the local geometric transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object by the specified dimensions. This method prepends the translation to the transformation.

| Parameter | Type                                                          | Description                                                                |
| --------- | ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| **dx**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The dimension by which to translate the transformation in the x direction. |
| **dy**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The dimension by which to translate the transformation in the y direction. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TranslateTransform(dx, dy, order)

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

| Parameter | Type                                                                                                        | Description                                                      |
| --------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| **dx**    | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                               | The value of the translation in x.                               |
| **dy**    | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                               | The value of the translation in y.                               |
| **order** | [MatrixOrder](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrixorder.md) | The order (prepend or append) in which to apply the translation. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathgradientbrush.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
