One of the core classes in the GDI+ framework built in .Net is the Brush class. There are 5 types of Brushes in .Net that help you to color your objects by lot of variations the five types are as shown in the figure :
[more]
The 5 types as shown are :
SolidBrush | Defines a brush of a single color. Brushes are used to fill graphics shapes, such as rectangles, ellipses, pies, polygons, and paths. |
HatchBrush | Defines a rectangular brush with a hatch style, a foreground color, and a background color. |
LinearGradientBrush | Encapsulates a Brush with a linear gradient. |
PathGradientBrush | Encapsulates a Brush object that fills the interior of a GraphicsPath object with a gradient. |
TextureBrush | Each property of the TextureBrush class is a Brush object that uses an image to fill the interior of a shape. |
I have built a simple application that uses and shows the output of each brush, remember that options of each bursh is not limited to my sample, there are much more one can do using these brushes.
Sample Application Code :
Leave a Reply