> 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/system.drawing.texturebrush.md).

# TextureBrush

Namespace: **System.Drawing**

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

Each property of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class is a [Brush](/system.drawing.managed/api/system.drawing/system.drawing.brush.md) object that uses an image to fill the interior of a shape. This class cannot be inherited.

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

```csharp
public class TextureBrush : Brush
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(bitmap)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image.

| Name       | Type                                                                        | Description                                                                                                                                                  |
| ---------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **bitmap** | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md) | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, dstRect)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image and bounding rectangle.

| Name        | Type                                                                          | Description                                                                                                                                                                                                                                 |
| ----------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **image**   | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md)   | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                                |
| **dstRect** | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structure that represents the bounding rectangle for this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, dstRect)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image and bounding rectangle.

| Name        | Type                                                                        | Description                                                                                                                                                                                                                               |
| ----------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **image**   | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md) | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                              |
| **dstRect** | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structure that represents the bounding rectangle for this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, wrapMode)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image and wrap mode.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **image**    | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md)                           | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                                           |
| **wrapMode** | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | A [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) enumeration that specifies how this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object is tiled. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, wrapMode, dstRect)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image, wrap mode, and bounding rectangle.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **image**    | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md)                           | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                                           |
| **wrapMode** | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | A [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) enumeration that specifies how this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object is tiled. |
| **dstRect**  | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef)                         | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structure that represents the bounding rectangle for this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.            |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, wrapMode, dstRect)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image, wrap mode, and bounding rectangle.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                                                                            |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **image**    | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md)                           | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                                           |
| **wrapMode** | [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) | A [WrapMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.wrapmode.md) enumeration that specifies how this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object is tiled. |
| **dstRect**  | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle)                           | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structure that represents the bounding rectangle for this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.              |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, dstRect, imageAttr)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image, bounding rectangle, and image attributes.

| Name          | Type                                                                                                            | Description                                                                                                                                                                                                                                                                                   |
| ------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **image**     | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md)                                     | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                                                                                  |
| **dstRect**   | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef)                                   | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structure that represents the bounding rectangle for this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.                                                   |
| **imageAttr** | [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) | An [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object that contains additional information about the image used by this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) TextureBrush(image, dstRect, imageAttr)

Initializes a new instance of the [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) class that uses the specified image, bounding rectangle, and image attributes.

| Name          | Type                                                                                                            | Description                                                                                                                                                                                                                                                                                   |
| ------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **image**     | [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md)                                     | The [Image](#image) object with which this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object fills interiors.                                                                                                                                  |
| **dstRect**   | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle)                                     | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structure that represents the bounding rectangle for this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.                                                     |
| **imageAttr** | [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) | An [ImageAttributes](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.imageattributes.md) object that contains additional information about the image used by this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object. |

## Properties

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

[Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md): Gets the [Image](#image) object associated with this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.

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

[Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md): Gets or sets a copy of the [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) object that defines a local geometric transformation for the image associated with this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.

### ![](/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 [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.

## Methods

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

Creates an exact copy of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object.

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

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

Multiplies the [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) object that represents the local geometric transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object by the specified [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) object by prepending the specified [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) object.

| 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) object by which to multiply the geometric transformation. |

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

Multiplies the [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) object that represents the local geometric transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object by the specified [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) object 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) object by which to multiply the geometric transformation.                           |
| **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) enumeration that specifies the order in which to multiply the two matrices. |

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

Resets the property of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object to identity.

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

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

| 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 transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object 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) enumeration that specifies whether to append or prepend the rotation matrix. |

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

Scales the local geometric transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object by the specified amounts. This method prepends the scaling matrix to the transformation.

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

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

Scales the local geometric transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object 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 transformation in the x direction.                                                                                                                       |
| **sy**    | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                               | The amount by which to scale the transformation in the y 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) enumeration that specifies whether to append or prepend the scaling matrix. |

### ![](/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 transformation of this [TextureBrush](/system.drawing.managed/api/system.drawing/system.drawing.texturebrush.md) object by the specified dimensions in the specified order.

| 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. |
| **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/system.drawing.texturebrush.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.
