TextureBrush

System.Drawing.TextureBrush

Namespace: System.Drawing

Assembly: System.Drawing.Managed (4.0.0.0)

Each property of the TextureBrush class is a Brush object that uses an image to fill the interior of a shape. This class cannot be inherited.

public class TextureBrush : Brush

Constructors

TextureBrush(bitmap)

Initializes a new instance of the TextureBrush class that uses the specified image.

Name
Type
Description

bitmap

The Image object with which this TextureBrush object fills interiors.

TextureBrush(image, dstRect)

Initializes a new instance of the TextureBrush class that uses the specified image and bounding rectangle.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

dstRect

A RectangleF structure that represents the bounding rectangle for this TextureBrush object.

TextureBrush(image, dstRect)

Initializes a new instance of the TextureBrush class that uses the specified image and bounding rectangle.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

dstRect

A Rectangle structure that represents the bounding rectangle for this TextureBrush object.

TextureBrush(image, wrapMode)

Initializes a new instance of the TextureBrush class that uses the specified image and wrap mode.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

wrapMode

A WrapMode enumeration that specifies how this TextureBrush object is tiled.

TextureBrush(image, wrapMode, dstRect)

Initializes a new instance of the TextureBrush class that uses the specified image, wrap mode, and bounding rectangle.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

wrapMode

A WrapMode enumeration that specifies how this TextureBrush object is tiled.

dstRect

A RectangleF structure that represents the bounding rectangle for this TextureBrush object.

TextureBrush(image, wrapMode, dstRect)

Initializes a new instance of the TextureBrush class that uses the specified image, wrap mode, and bounding rectangle.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

wrapMode

A WrapMode enumeration that specifies how this TextureBrush object is tiled.

dstRect

A Rectangle structure that represents the bounding rectangle for this TextureBrush object.

TextureBrush(image, dstRect, imageAttr)

Initializes a new instance of the TextureBrush class that uses the specified image, bounding rectangle, and image attributes.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

dstRect

A RectangleF structure that represents the bounding rectangle for this TextureBrush object.

imageAttr

An ImageAttributes object that contains additional information about the image used by this TextureBrush object.

TextureBrush(image, dstRect, imageAttr)

Initializes a new instance of the TextureBrush class that uses the specified image, bounding rectangle, and image attributes.

Name
Type
Description

image

The Image object with which this TextureBrush object fills interiors.

dstRect

A Rectangle structure that represents the bounding rectangle for this TextureBrush object.

imageAttr

An ImageAttributes object that contains additional information about the image used by this TextureBrush object.

Properties

Image

Image: Gets the Image object associated with this TextureBrush object.

Transform

Matrix: Gets or sets a copy of the Matrix object that defines a local geometric transformation for the image associated with this TextureBrush object.

WrapMode

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

Methods

Clone()

Creates an exact copy of this TextureBrush object.

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

MultiplyTransform(matrix)

Multiplies the Matrix object that represents the local geometric transformation of this TextureBrush object by the specified Matrix object by prepending the specified Matrix object.

Parameter
Type
Description

matrix

The Matrix object by which to multiply the geometric transformation.

MultiplyTransform(matrix, order)

Multiplies the Matrix object that represents the local geometric transformation of this TextureBrush object by the specified Matrix object in the specified order.

Parameter
Type
Description

matrix

The Matrix object by which to multiply the geometric transformation.

order

A MatrixOrder enumeration that specifies the order in which to multiply the two matrices.

ResetTransform()

Resets the property of this TextureBrush object to identity.

RotateTransform(angle)

Rotates the local geometric transformation of this TextureBrush object by the specified amount. This method prepends the rotation to the transformation.

Parameter
Type
Description

angle

The angle of rotation.

RotateTransform(angle, order)

Rotates the local geometric transformation of this TextureBrush object by the specified amount in the specified order.

Parameter
Type
Description

angle

The angle of rotation.

order

A MatrixOrder enumeration that specifies whether to append or prepend the rotation matrix.

ScaleTransform(sx, sy)

Scales the local geometric transformation of this TextureBrush object by the specified amounts. This method prepends the scaling matrix to the transformation.

Parameter
Type
Description

sx

The amount by which to scale the transformation in the x direction.

sy

The amount by which to scale the transformation in the y direction.

ScaleTransform(sx, sy, order)

Scales the local geometric transformation of this TextureBrush object by the specified amounts in the specified order.

Parameter
Type
Description

sx

The amount by which to scale the transformation in the x direction.

sy

The amount by which to scale the transformation in the y direction.

order

A MatrixOrder enumeration that specifies whether to append or prepend the scaling matrix.

TranslateTransform(dx, dy)

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

Parameter
Type
Description

dx

The dimension by which to translate the transformation in the x direction.

dy

The dimension by which to translate the transformation in the y direction.

TranslateTransform(dx, dy, order)

Translates the local geometric transformation of this TextureBrush object by the specified dimensions in the specified order.

Parameter
Type
Description

dx

The dimension by which to translate the transformation in the x direction.

dy

The dimension by which to translate the transformation in the y direction.

order

The order (prepend or append) in which to apply the translation.

Last updated

Was this helpful?