HatchBrush Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기