Chapter 33. Introduction to GDI +

In the previous chapter, the term GDI+ was briefly introduced when you looked at printing in the .NET Framework. This chapter provides a real introduction to programming using the Graphics Device Interface classes (GDI+), the drawing technology of the .NET Framework. Mapping applications, games, computer-aided design/computer-aided manufacturing (CAD/CAM), drawing programs, charting programs, and many other types of applications require developers to write graphics code for their Windows Forms applications. Writing custom controls can also require graphics code. With this latest class library, Microsoft has made writing graphics code easier than ever.

Writing graphics code is one of the most enjoyable programming tasks. It is very rewarding to change your code and immediately see the results in a visible form. Whether you are writing a custom graphics window that presents something in your application in a new and different way or writing a custom control that makes your application more stylish and more usable, your application will be well received by the general public.

This chapter first explains the mechanics of drawing using GDI+, and you write a few simple graphical example programs. Then you take a high-level look at some of the extensive capabilities of GDI+ such as clipping. After an overview of each of these topics, you look at the classes you can use to implement the features. Knowing what you can do and understanding the class hierarchy ...

Get Beginning Microsoft® Visual C#® 2008 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.