Your First GDI+ Application
In this chapter we move to the more practical aspects of writing graphics applications using GDI+ in the .NET Framework. This chapter is the foundation chapter and discusses vital concepts, including the life cycle of a graphics application. After reading this chapter, you should understand the basics of the GDI+ coordinate system, basic graphics structures used by GDI+, drawing surfaces, and how to write a graphics application using GDI+.
To write a graphics application, a good understanding of drawing surfaces and coordinate systems is necessary. We will begin by discussing these concepts and how they are represented in GDI+. Then you'll learn step-by-step how to write a graphics application in the .NET Framework using GDI+. We will cover the following topics:
- How to add a reference to the GDI+ library
- How to get a drawing surface in the program
- How to create pens and brushes
- How to use pens and brushes to draw graphics objects
At the end of this chapter we will discuss some basic graphics structures and their members. These structures are used in examples throughout this book and include the following:
- Color
- Point and PointF
- Rectangle and RectangleF
- Size and SizeF