Managed C++ and .NET Development: Visual Studio .NET 2003 Edition
A Quick Look at the GDI+ Namespaces
You can find the core functionality of GDI+ in the .NET Framework class library namespaces listed in Table 11-1.
NAMESPACE | DESCRIPTION |
---|---|
System: :Drawing | This namespace is the core of GDI+. It consists of numerous classes to handle basic 2D rendering. It is also the location of the Graphics class from which all GDI+ functionality springs. |
System::Drawing: :Drawing2D | This namespace extends the 2D rendering capabilities of GDI+ by providing more advanced 2D rendering and vector graphics. |
System: :Drawing: :Images | This namespace provides classes that allow direct manipulation of graphical images. |
System: :Drawing: :Printing | This namespace provides classes that allow printing to a printer. It also provides classes to interact with the printer. |
System: :Drawing: :Text | This namespace provides advanced font and font family functionality. |
Primarily, most of the functionality that you'll be working with is found in the classes and structures in the System::Drawing namespace (see Table 11-2).
CLASS/STRUCTURE | DESCRIPTION |
---|---|
Bitmap | A class that represents and provides limited manipulation capabilities for an image file with formats such as .bmp, .gif, and .jpg |
Brush | A class used to specify the color and pattern to fill the interior of a shape such as a rectangle, ellipsis, or polygon |
Brushes | A class made up of several static properties of predefined brushes |
Color | A structure that represents a color |
Font | A class that represents a font |
FontFamily | A class that defines a group of fonts with the same basic design |
Graphics | The core class of GDI+ that represents a drawing surface where you will place your text, shapes, and images |
Icon | A class that represents a Windows icon |
Image | An abstract base class used in all image type classes such as bitmaps and icons |
Pen | A class used to specify the color, thickness, and pattern used to outline shapes |
Pens | A class made up of several static properties of predefined pens |
Point, PointF | A structure that represents an x,y coordinate as either a pair of Int32s or Singles |
Rectangle, RectangleF | A structure that represents the size and location of a rectangle using either Int32 or Single values |
Region | A sealed class that describes a geometric shape using rectangles |
Size, SizeF | A structure that represents a size as either a pair of Int32s or Singles |
SolidBrushes | A class that defines a Brush that fills a shape with a solid color |
StringFormat | A sealed class that specifies the layout information such as alignment, formatting, and line spacing for a set of text |
SystemBrushes | A class made up of several static properties of SolidBrushes using system colors |
SystemColors | A class made up of several static properties of system colors |
SystemIcons | A class made up of several static properties of Windows system icons |
SystemPens | A class made up of several static properties of Pens using system colors |
TextureBrush | A class that represents a Brush that uses an image to fill a shape interior |
All of the functionality of GDI+ is located within the System.Drawing.dll assembly. Thus, you need to reference it at the top of your source code with the following #using statement:
#using <System.Drawing.dll>
Категории