Επεξεργασία

Κοινή χρήση μέσω


HatchBrush Constructors

Definition

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

Overloads

HatchBrush(HatchStyle, Color)

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

HatchBrush(HatchStyle, Color, Color)

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

HatchBrush(HatchStyle, Color)

Source:
HatchBrush.cs
Source:
HatchBrush.cs
Source:
HatchBrush.cs
Source:
HatchBrush.cs
Source:
HatchBrush.cs

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

public:
 HatchBrush(System::Drawing::Drawing2D::HatchStyle hatchstyle, System::Drawing::Color foreColor);
public HatchBrush (System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing.Color foreColor);
new System.Drawing.Drawing2D.HatchBrush : System.Drawing.Drawing2D.HatchStyle * System.Drawing.Color -> System.Drawing.Drawing2D.HatchBrush
Public Sub New (hatchstyle As HatchStyle, foreColor As Color)

Parameters

hatchstyle
HatchStyle

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

foreColor
Color

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

Remarks

The background color is initialized to black.

Applies to

HatchBrush(HatchStyle, Color, Color)

Source:
HatchBrush.cs
Source:
HatchBrush.cs
Source:
HatchBrush.cs
Source:
HatchBrush.cs
Source:
HatchBrush.cs

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

public:
 HatchBrush(System::Drawing::Drawing2D::HatchStyle hatchstyle, System::Drawing::Color foreColor, System::Drawing::Color backColor);
public HatchBrush (System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing.Color foreColor, System.Drawing.Color backColor);
new System.Drawing.Drawing2D.HatchBrush : System.Drawing.Drawing2D.HatchStyle * System.Drawing.Color * System.Drawing.Color -> System.Drawing.Drawing2D.HatchBrush
Public Sub New (hatchstyle As HatchStyle, foreColor As Color, backColor As Color)

Parameters

hatchstyle
HatchStyle

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

foreColor
Color

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

backColor
Color

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

Examples

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

HatchBrush hBrush = new HatchBrush(
   HatchStyle.Horizontal,
   Color.Red,
   Color.FromArgb(255, 128, 255, 255));
e.Graphics.FillEllipse(hBrush, 0, 0, 100, 60);
Dim hBrush As New HatchBrush( _
   HatchStyle.Horizontal, _
   Color.Red, _
   Color.FromArgb(255, 128, 255, 255))
e.Graphics.FillEllipse(hBrush, 0, 0, 100, 60)

Remarks

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

Hatch Pattern

Applies to