System.Drawing
Namespace
The
System.Drawing
namespace provides basic GDI+
functionality. If contains the definition of
basic classes such as
Brush,
Pen,
Graphics,
Bitmap,
Font
etc. The Graphics class plays a major role
in GDI+ and contains methods for drawing to
the display device. The following table
contains some of the
System.Drawing
namespace classes, structures and their
definition.
Classes
Classes |
Description |
Bitmap,
Image |
Bitmap
and image classes. |
Brush,
Brushes |
Brush
classes used define objects to fill
GDI objects such as rectangles,
ellipses, pies, polygons, and paths. |
Font,
FontFamily |
Defines a particular format for
text, including font face, size, and
style attributes. Not inheritable. |
Graphics |
Encapsulates a GDI+ drawing surface.
Not inheritable. |
Pen |
Defines an object used to draw lines
and curves. Not inheritable. |
SolidBrush,
TextureBrush, |
Defines a brush of a single color.
Brushes are used to fill graphics
shapes, such as rectangles,
ellipses, pies, polygons, and paths.
Not inheritable. |
Structures
Structure |
Description |
Color |
Represents an ARGB color. |
Point, PointF |
Represents a 2D x- and
y-coordinates. Point takes x, y
values as a number. You can use
PointF if you want to use floating
number values. |
Rectangle, RectangleF |
Represents a rectangle with integer
values. A rectangle represents two
point pair - top, left and bottom,
right. You can use floating values
in RectangleF. |
Size |
Size
of a rectangular region with an
ordered pair of width and height.
Size takes an integer as width and
height while SizeF takes floating
numbers to represent width and
height. |
System.Drawing.Design Namespace
The
System.Drawing.Design
namespace is somewhat smaller in compare to
the System.Drawing. It xtends design-time
user interface (UI) logic and drawing
functionality and provides classes for
customizing toolbox and editor classes. For
beginners there is nothing in this
namespace. At present (.NET Beta 2) it has
two types of classes -
Editor
Classes
BitmapEditor
,
FontEditor
,
and
ImageEditor
are the editor
classes. You can use these classes to extend
the functionality and provide an option in
properties window to edit images and fonts.
ToolBox
Classes
ToolBoxItem, ToolBoxItemCollection
are two
major toolbox classes. By using these
classes you can extend the functionality of
toolbox and provide the implementation of
toolbox items.
GDI+ Font,
Brush
and
Bitmap
GDI+ GraphicsPath
and
LinearGradientBrush
GDI+ Printing.
GDI+
and
DrawArc
and
DrawPath
GDI+ Color
and
ARGB
with
Example