The Drawing Namespace

The System.Drawing namespace includes several classes and structures. The most important of them are summarized, briefly, in Table 10-1.

Table 10-1. Drawing namespace classes and structures

Class

Description

Bitmap

Encapsulates a GDI+ bitmap, i.e., pixel data representing an image.

Brush

Abstract base class. Used to fill the interiors of graphical shapes.

Brushes

Provides static brush definitions for all standard colors.

Color

Structure representing colors, e.g., Color.Green.

Font

Defines a format for text, including font face, and sizeEncapsulates a typeface, size, style, and effects.

FontFamily

Group of type faces with the same basic design.

Graphics

Encapsulates a GDI+ drawing surface.

Icon

Transparent bitmaps used for Windows icons.

Image

Abstract base class common to the Bitmap, Icon, and Metafile classes.

Pen

Defines an object used to draw lines and curves.

Pens

Provides static Pen definitions for all the standard colors.

Point

Structure used to represent an ordered pair of integers. Typically used to specify two-dimensional Cartesian coordinates.

PointF

Same as Point, but uses a floating-point number (float in C#, Single in VB.NET) rather than an integer.

Rectangle

Structure that represents the location and size of a rectangular region.

RectangleF

Same as Rectangle, but uses floating-point values (float in C#, single in VB.NET) rather than integers.

Size

Structure that represents the size of a rectangular region as an ...

Get Programming .NET Windows Applications 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.