HatchBrush Constructor (HatchStyle, Color, Color)

 

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

Namespace:   System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

public:
HatchBrush(
	HatchStyle hatchstyle,
	Color foreColor,
	Color backColor
)

Parameters

hatchstyle
Type: System.Drawing.Drawing2D::HatchStyle

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

foreColor
Type: System.Drawing::Color

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

backColor
Type: System.Drawing::Color

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

The following illustration shows an ellipse filled with a horizontal hatch pattern.

Hatch Pattern

The following example shows how to use the HatchBrush to create the HatchBrush shown in the previous illustration.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: