> 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.lineargradientbrush.md).

# LinearGradientBrush

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) with a linear gradient. This class cannot be inherited.

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

```csharp
public class LinearGradientBrush : Brush
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(point1, point2, color1, color2)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class with the specified points and colors.

| Name       | Type                                                                  | Description                                                                                                                                  |
| ---------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **point1** | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structure that represents the starting point of the linear gradient. |
| **point2** | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structure that represents the endpoint of the linear gradient.       |
| **color1** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)   | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color of the linear gradient.   |
| **color2** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)   | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color of the linear gradient.     |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(point1, point2, color1, color2)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class with the specified points and colors.

| Name       | Type                                                                | Description                                                                                                                                |
| ---------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **point1** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structure that represents the starting point of the linear gradient. |
| **point2** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structure that represents the endpoint of the linear gradient.       |
| **color1** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color of the linear gradient. |
| **color2** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color of the linear gradient.   |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(rect, color1, color2, linearGradientMode)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class based on a rectangle, starting and ending colors, and an orientation mode.

| Name                   | Type                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **rect**               | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef)                                             | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structure that specifies the bounds of the linear gradient.                                                                                                                                                                                                                                                                                          |
| **color1**             | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                                       | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color for the gradient.                                                                                                                                                                                                                                                                                                 |
| **color2**             | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                                       | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color for the gradient.                                                                                                                                                                                                                                                                                                   |
| **linearGradientMode** | [LinearGradientMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientmode.md) | A [LinearGradientMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientmode.md) enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(rect, color1, color2, linearGradientMode)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class based on a rectangle, starting and ending colors, and orientation.

| Name                   | Type                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **rect**               | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle)                                               | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structure that specifies the bounds of the linear gradient.                                                                                                                                                                                                                                                                                            |
| **color1**             | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                                       | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color for the gradient.                                                                                                                                                                                                                                                                                                 |
| **color2**             | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)                                                       | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color for the gradient.                                                                                                                                                                                                                                                                                                   |
| **linearGradientMode** | [LinearGradientMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientmode.md) | A [LinearGradientMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientmode.md) enumeration element that specifies the orientation of the gradient. The orientation determines the starting and ending points of the gradient. For example, specifies that the starting point is the upper-left corner of the rectangle and the ending point is the lower-right corner of the rectangle. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(rect, color1, color2, angle)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class based on a rectangle, starting and ending colors, and an orientation angle.

| Name       | Type                                                                          | Description                                                                                                                                 |
| ---------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **rect**   | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structure that specifies the bounds of the linear gradient. |
| **color1** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)           | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color for the gradient.        |
| **color2** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)           | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color for the gradient.          |
| **angle**  | [Single](https://docs.microsoft.com/dotnet/api/system.single)                 | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.                                               |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(rect, color1, color2, angle)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class based on a rectangle, starting and ending colors, and an orientation angle.

| Name       | Type                                                                        | Description                                                                                                                               |
| ---------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **rect**   | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structure that specifies the bounds of the linear gradient. |
| **color1** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)         | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color for the gradient.      |
| **color2** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)         | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color for the gradient.        |
| **angle**  | [Single](https://docs.microsoft.com/dotnet/api/system.single)               | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.                                             |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(rect, color1, color2, angle, isAngleScalable)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class based on a rectangle, starting and ending colors, and an orientation angle.

| Name                | Type                                                                          | Description                                                                                                                                                                                                                  |
| ------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **rect**            | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structure that specifies the bounds of the linear gradient.                                                                                  |
| **color1**          | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)           | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color for the gradient.                                                                                         |
| **color2**          | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)           | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color for the gradient.                                                                                           |
| **angle**           | [Single](https://docs.microsoft.com/dotnet/api/system.single)                 | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.                                                                                                                                |
| **isAngleScalable** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)               | Set to to specify that the angle is affected by the transform associated with this [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md); otherwise, . |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) LinearGradientBrush(rect, color1, color2, angle, isAngleScalable)

Initializes a new instance of the [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md) class based on a rectangle, starting and ending colors, and an orientation angle.

| Name                | Type                                                                        | Description                                                                                                                                                                                                                  |
| ------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **rect**            | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structure that specifies the bounds of the linear gradient.                                                                                    |
| **color1**          | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)         | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the starting color for the gradient.                                                                                         |
| **color2**          | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)         | A [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) structure that represents the ending color for the gradient.                                                                                           |
| **angle**           | [Single](https://docs.microsoft.com/dotnet/api/system.single)               | The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.                                                                                                                                |
| **isAngleScalable** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)             | Set to to specify that the angle is affected by the transform associated with this [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md); otherwise, . |

## 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) GammaCorrection

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets or sets a value indicating whether gamma correction is enabled for this [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md).

### ![](/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) LinearColors

[Color\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.color): Gets or sets the starting and ending colors of the gradient.

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

[RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef): Gets a rectangular region that defines the starting and ending points of the gradient.

### ![](/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 [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.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 [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.md).

## Methods

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

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

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object). The [LinearGradientBrush](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.lineargradientbrush.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.lineargradientbrush.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.
