Brushes
Brushes are used to fill basic geometric shapes such as rectangles, ellipses, and polygons. The System.Drawing.Brush class is an abstract base class and cannot be instantiated directly. The Brush class serves as a base class for various brush styles. Figure 4.1 shows four of the common brush styles in action.
Figure 4.1. Basic brushes.
The following sections describe the Brush class styles.
SolidBrush
A SolidBrush is just as its name implies: it creates a solid color that fills a graphics primitive such as a triangle, circle, or rectangle. All graphics primitives are constructed from the most basic primitive, the point. Points can be used ...
Get .NET Windows® Forms Custom Controls now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.