Some Basic GDI+ Objects

Table of contents:

SUMMARY

Before you write a graphics application, a basic understanding of drawing surfaces and coordinate systems is a must. This chapter began with the basics of the drawing surfaces and the coordinate system, describing how drawing surfaces and coordinate systems are represented in GDI+ and how the GDI+ coordinate system differs from other coordinate systems.

Before using any GDI+-related classes defined in the .NET Framework library, you must reference System.Drawing and its subnamespaces. In this chapter you learned how to add references to the GDI+ library and how to import the GDI+-related namespaces into your application. After adding a reference to the GDI+ library and namespaces to the application, the next step is to get the Graphics object. There are several ways to get a Graphics object in an application. This chapter discussed three different ways, and then showed how to use the Graphics class methods to draw and fill lines, rectangles, and ellipses. You also learned to dispose of objects when you're finished with them.

Finally, we covered some basic GDI+ structuresincluding Color, Rectangle, RectangleF, Point, PointF, Size, and SizeFdescribing their members and how to use them in your applications.

You should now be able to write simple graphics applications using GDI+.

Chapter 3 is all about the Graphics class and will demonstrate how quickly you can write real-world applications. By the end of Chapter 3, you will be able to write your own 2D paint application similar to Microsoft's PaintBrush, using your newly acquired GDI+ skills.

GDI+: The Next-Generation Graphics Interface

Your First GDI+ Application

The Graphics Class

Working with Brushes and Pens

Colors, Fonts, and Text

Rectangles and Regions

Working with Images

Advanced Imaging

Advanced 2D Graphics

Transformation

Printing

Developing GDI+ Web Applications

GDI+ Best Practices and Performance Techniques

GDI Interoperability

Miscellaneous GDI+ Examples

Appendix A. Exception Handling in .NET



GDI+ Programming with C#
GDI+ Programming with C#
ISBN: 073561265X
EAN: N/A
Year: 2003
Pages: 145

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net