HatchBrush

System.Drawing.Drawing2D.HatchBrush

Namespace: System.Drawing.Drawing2D

Assembly: System.Drawing.Managed (4.0.0.0)

Defines a rectangular brush with a hatch style, a foreground color, and a background color. This class cannot be inherited.

public class HatchBrush : Brush

Constructors

HatchBrush(hatchstyle, foreColor)

Initializes a new instance of the HatchBrush class with the specified HatchStyle enumeration and foreground color.

Name
Type
Description

hatchstyle

One of the HatchStyle values that represents the pattern drawn by this HatchBrush.

foreColor

The Color structure that represents the color of lines drawn by this HatchBrush.

HatchBrush(hatchstyle, foreColor, backColor)

Initializes a new instance of the HatchBrush class with the specified HatchStyle enumeration, foreground color, and background color.

Name
Type
Description

hatchstyle

One of the HatchStyle values that represents the pattern drawn by this HatchBrush.

foreColor

The Color structure that represents the color of lines drawn by this HatchBrush.

backColor

The Color structure that represents the color of spaces between the lines drawn by this HatchBrush.

Properties

BackgroundColor

Color: Gets the color of spaces between the hatch lines drawn by this HatchBrush object.

ForegroundColor

Color: Gets the color of hatch lines drawn by this HatchBrush object.

HatchStyle

HatchStyle: Gets the hatch style of this HatchBrush object.

Methods

Clone()

Creates an exact copy of this HatchBrush object.

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

Last updated

Was this helpful?