Chapter 17. Programming with GDI

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Part III.  User Interface Design


Chapter 17. Programming with GDI+

In This Chapter

  • GDI+ Basics

  • Advanced Drawing

  • Custom Drawing in Windows Forms

  • Graphics Printing

  • Summary

The biggest gain that an object-oriented framework gives us is productivity. It's not necessarily that we can accomplish a greater variety of things with Graphics Device Interface (GDI+); rather, it's that we can be more productive in a shorter period of time. This productivity increase is provided to the framework developers too, resulting in a growing productivity for them as well.

You can walk from New York to Los Angeles, but you can get there a lot faster by car, or fastest of all by plane. Think of the 5- hour trip by plane from LaGuardia to LAX as a productivity gain of about 40 hours. (I am guessing here because I have made the trip from Michigan to Los Angeles and Michigan to New York several times but never coast to coast . I know with authority that you can listen to 30 hours of Ken Follett's The Pillars of the Earth while traveling from Las Vegas to Lansing by car.)

Is a 40-hour productivity gain valuable ? Let me rephrase that. Is a 90% reduction in travel timefrom 45 hours to 5worth the effort it takes to get that savings? You better believe it. A good object-oriented framework may not provide any more technical opportunities than assembly language does, but a good framework will provide a significant productivity gain. A big productivity gain is what Visual Basic .NET and GDI+ do for us.

GDI+ wraps API calls into tidy namespaces and classes and makes it easier to work with what is euphemistically referred to as a canvas, the device context (DC). Instead of requiring the individual developer to carefully manage the DC, the Graphics object provided by GDI+ is stateless and is easier to use than disjointed API calls. In this chapter you will find out how much easier it is to perform custom painting and drawing and create shaped and opaque forms, and how the GDI+ namespaces make it easier to render graphics on other objects like printers.


Team-Fly    
Top
 


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 222

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