Class HatchBrush
Defines a rectangular, horizontal, vertical, or crosshatch brush.
Implements
Inherited Members
Namespace: DRIT.Drawing.Drawing2D
Assembly: DRIT.Drawing.dll
Syntax
public sealed class HatchBrush : Brush, IDisposable
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.
Constructors
HatchBrush(HatchStyle, Color)
Initializes a new HatchBrush with the specified hatch style and foreground color. The background color defaults to black.
Declaration
public HatchBrush(HatchStyle hatchStyle, Color foreColor)
Parameters
| Type | Name | Description |
|---|---|---|
| HatchStyle | hatchStyle | The hatch style enumeration specifying the pattern. |
| Color | foreColor | The foreground color. |
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.
HatchBrush(HatchStyle, Color, Color)
Initializes a new HatchBrush with the specified hatch style, foreground color, and background color.
Declaration
public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
Parameters
| Type | Name | Description |
|---|---|---|
| HatchStyle | hatchStyle | The hatch style enumeration specifying the pattern. |
| Color | foreColor | The foreground color. |
| Color | backColor | The background color. |
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.
Properties
BackgroundColor
Gets the background color of this brush.
Declaration
public Color BackgroundColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.
ForegroundColor
Gets the foreground color of this brush.
Declaration
public Color ForegroundColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.
HatchStyle
Gets the hatch style of this brush.
Declaration
public HatchStyle HatchStyle { get; }
Property Value
| Type | Description |
|---|---|
| HatchStyle |
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.
Methods
Clone()
Creates an exact copy of this HatchBrush.
Declaration
public override Brush Clone()
Returns
| Type | Description |
|---|---|
| Brush | A new HatchBrush with the same properties. |
Overrides
Remarks
A HatchBrush fills shapes with a hatching pattern defined by HatchStyle, using a foreground and background color.