HatchBrush Constructors
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.
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. |
- 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
.NET 9 (package-provided) en andere versies
Product | Versies |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
- 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 9 (package-provided) en andere versies
Product | Versies |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET-feedback
.NET is een open source project. Selecteer een koppeling om feedback te geven: