Introduction
In this chapter, we overview C#'s tools for drawing two-dimensional shapes and for controlling colors and fonts. C# supports graphics that enable programmers to enhance their Windows applications visually. The FCL contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other namespaces that make up the .NET resource GDI+. GDI+ is an application programming interface (API) that provides classes for creating two-dimensional vector graphics (a way to describe graphics so that they may be easily manipulated with high-performance techniques), manipulating fonts and inserting images.
We begin with an introduction to the .NET framework's drawing capabilities. We then present more powerful drawing capabilities, such as changing the styles of lines used to draw shapes and controlling the colors and patterns of filled shapes.
Later in this chapter, we explore techniques for manipulating images and creating smooth animations. We also discuss class Image, which can store and manipulate images of various formats. We explain how to combine the graphical rendering capabilities covered in the early sections of the chapter with those for image manipulation. This chapter ends with several multimedia examples in which you build an animation, use the Windows Media Player control and use Microsoft Agenta technology for adding interactive animated characters to applications or Web pages.