HatchBrush 构造函数

定义

使用指定的 HatchBrush 枚举和前景色初始化 HatchStyle 类的新实例。

重载

HatchBrush(HatchStyle, Color)

使用指定的 HatchBrush 枚举和前景色初始化 HatchStyle 类的新实例。

HatchBrush(HatchStyle, Color, Color)

使用指定的 HatchBrush 枚举、前景色和背景色初始化 HatchStyle 类的新实例。

HatchBrush(HatchStyle, Color)

使用指定的 HatchBrush 枚举和前景色初始化 HatchStyle 类的新实例。

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)

参数

hatchstyle
HatchStyle

HatchStyle 值之一,表示此 HatchBrush 所绘制的图案。

foreColor
Color

Color 结构,它表示此 HatchBrush 所绘制线条的颜色。

注解

背景色初始化为黑色。

适用于

HatchBrush(HatchStyle, Color, Color)

使用指定的 HatchBrush 枚举、前景色和背景色初始化 HatchStyle 类的新实例。

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)

参数

hatchstyle
HatchStyle

HatchStyle 值之一,表示此 HatchBrush 所绘制的图案。

foreColor
Color

Color 结构,它表示此 HatchBrush 所绘制线条的颜色。

backColor
Color

Color 结构,它表示此 HatchBrush 绘制的线条间空间的颜色。

示例

下面的示例演示如何使用该 HatchBrush 图创建 HatchBrush 上图中显示的内容。

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)

注解

下图显示了填充水平阴影图案的省略号。

阴影图案

适用于