Defines a rectangular brush with a hatch style, a foreground color, and a background color. This class cannot be inherited.
public ref class HatchBrush sealed : System::Drawing::Brush
public sealed class HatchBrush : System.Drawing.Brush
type HatchBrush = class inherit Brush
Public NotInheritable Class HatchBrush Inherits Brush
The following example shows how 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)
A hatch pattern is made from two colors: one defined by the BackgroundColor, which fills the background and one for the lines that form the pattern over the background defined by the ForegroundColor property. The HatchStyle property defines what type of pattern the brush has and can be any value from the HatchStyle enumeration. There are more than fifty elements in the HatchStyle enumeration.
The following illustration shows an ellipse filled with a horizontal hatch pattern.
|HatchBrush(HatchStyle, Color, Color)|
Gets the color of spaces between the hatch lines drawn by this HatchBrush object.
Gets the color of hatch lines drawn by this HatchBrush object.
Gets the hatch style of this HatchBrush object.
Creates an exact copy of this HatchBrush object.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject)
Releases all resources used by this Brush object.(Inherited from Brush)
Releases the unmanaged resources used by the Brush and optionally releases the managed resources.(Inherited from Brush)
Determines whether the specified object is equal to the current object.(Inherited from Object)
Serves as the default hash function.(Inherited from Object)
Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject)
Gets the Type of the current instance.(Inherited from Object)
Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject)
Creates a shallow copy of the current Object.(Inherited from Object)
Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject)
In a derived class, sets a reference to a GDI+ brush object.(Inherited from Brush)
Returns a string that represents the current object.(Inherited from Object)