Main Page

  
Graphics Programming with GDI+
By Mahesh Chand
 
Publisher: Addison Wesley
Pub Date: October 17, 2003
ISBN: 0-321-16077-0
Pages: 784


"This is the most comprehensive book about graphics programming using GDI+ so far. This book will be a very useful handbook for everyone who does graphics programming for Windows."
-Min Liu, Software Design Engineer of GDI+, Microsoft Corporation

Graphics Programming with GDI+ is the .NET developer's guide to writing graphics applications for Windows and the Web. Through the use of detailed examples it provides experienced programmers with a deep understanding of the entire GDI+ API defined in the .NET Framework class library.

The book begins with an introduction to GDI+ and the basics of graphics programming in Windows. The core of the book is a hands-on guide to practical topics, including how to use Windows Forms and optimize GDI+ performance. Chapters demonstrate how to develop real-world tools such as GDI+Painter, GDI+Editor, ImageViewer, and ImageAnimator. The author provides extensive reusable sample code in C# throughout, and complete downloadable source code in C# and Visual Basic .NET is available online, as are color versions of screen shots from the book.

Key topics include:

  • How GDI+ compares to GDI

  • How GDI+ is defined and used in the .NET Framework

  • How to draw, paint, and fill graphics objects

  • Viewing and manipulating images

  • Transforming graphics objects, images, and colors

  • Printing in .NET

  • How to develop GDI+ Web applications

  • How to optimize drawing quality and performance

  • Interactive color blending and transparent colors

  • GDI interoperability

  • Answers to frequently asked GDI+ questions

Graphics Programming in GDI+ is the most in-depth treatment available on writing effective graphics applications for the .NET Framework.

  
• Table of Contents
Graphics Programming with GDI+
By Mahesh Chand
 
Publisher: Addison Wesley
Pub Date: October 17, 2003
ISBN: 0-321-16077-0
Pages: 784
Copyright
   Praise for Graphics Programming with GDI+
   Microsoft .NET Development Series
   Figures
   Tables
   Acknowledgments
   Introduction
      Who Is This Book For?
      Prerequisites
      What's in This Book That I Won't See in Other Books?
      Chapter Organization
      Example Source Code
      Exception and Error Handling in the Samples
      SUMMARY
      Chapter 1.  GDI+: The Next-Generation Graphics Interface
      Section 1.1.  Understanding GDI+
      Section 1.2.  Exploring GDI+ Functionality
      Section 1.3.  GDI+ from a GDI Perspective
      Section 1.4.  GDI+ Namespaces and Classes in .NET
      Summary
      Chapter 2.  Your First GDI+ Application
      Section 2.1.  Drawing Surfaces
      Section 2.2.  The Coordinate System
      Section 2.3.  Tutorial: Your First GDI+ Application
      Section 2.4.  Some Basic GDI+ Objects
      SUMMARY
      Chapter 3.  The Graphics Class
      Section 3.1.  Graphics Class Properties
      Section 3.2.  Graphics Class Methods
      Section 3.3.  The GDI+Painter Application
      Section 3.4.  Drawing a Pie Chart
      SUMMARY
      Chapter 4.  Working with Brushes and Pens
      Section 4.1.  Understanding and Using Brushes
      Section 4.2.  Using Pens in GDI+
      Section 4.3.  Transformation with Pens
      Section 4.4.  Transformation with Brushes
      Section 4.5.  System Pens and System Brushes
      Section 4.6.  A Real-World Example: Adding Colors, Pens, and Brushes to the GDI+Painter Application
      SUMMARY
      Chapter 5.  Colors, Fonts, and Text
      Section 5.1.  Accessing the Graphics Object
      Section 5.2.  Working with Colors
      Section 5.3.  Working with Fonts
      Section 5.4.  Working with Text and Strings
      Section 5.5.  Rendering Text with Quality and Performance
      Section 5.6.  Advanced Typography
      Section 5.7.  A Simple Text Editor
      Section 5.8.  Transforming Text
      SUMMARY
      Chapter 6.  Rectangles and Regions
      Section 6.1.  The Rectangle Structure
      Section 6.2.  The Region Class
      Section 6.3.  Regions and Clipping
      Section 6.4.  Clipping Regions Example
      Section 6.5.  Regions, Nonrectangular Forms, and Controls
      SUMMARY
      Chapter 7.  Working with Images
      Section 7.1.  Raster and Vector Images
      Section 7.2.  Working with Images
      Section 7.3.  Manipulating Images
      Section 7.4.  Playing Animations in GDI+
      Section 7.5.  Working with Bitmaps
      Section 7.6.  Working with Icons
      Section 7.7.  Skewing Images
      Section 7.8.  Drawing Transparent Graphics Objects
      Section 7.9.  Viewing Multiple Images
      Section 7.10.  Using a Picture Box to View Images
      Section 7.11.  Saving Images with Different Sizes
      SUMMARY
      Chapter 8.  Advanced Imaging
      Section 8.1.  Rendering Partial Bitmaps
      Section 8.2.  Working with Metafiles
      Section 8.3.  Color Mapping Using Color Objects
      Section 8.4.  Image Attributes and the ImageAttributes Class
      Section 8.5.  Encoder Parameters and Image Formats
      SUMMARY
      Chapter 9.  Advanced 2D Graphics
      Section 9.1.  Line Caps and Line Styles
      Section 9.2.  Understanding and Using Graphics Paths
      Section 9.3.  Graphics Containers
      Section 9.4.  Reading Metadata of Images
      Section 9.5.  Blending Explained
      Section 9.6.  Alpha Blending
      Section 9.7.  Miscellaneous Advanced 2D Topics
      SUMMARY
      Chapter 10.  Transformation
      Section 10.1.  Coordinate Systems
      Section 10.2.  Transformation Types
      Section 10.3.  The Matrix Class and Transformation
      Section 10.4.  The Graphics Class and Transformation
      Section 10.5.  Global, Local, and Composite Transformations
      Section 10.6.  Image Transformation
      Section 10.7.  Color Transformation and the Color Matrix
      Section 10.8.  Matrix Operations in Image Processing
      Section 10.9.  Text Transformation
      Section 10.10.  The Significance of Transformation Order
      SUMMARY
      Chapter 11.  Printing
      Section 11.1.  A Brief History of Printing with Microsoft Windows
      Section 11.2.  Overview of the Printing Process
      Section 11.3.  Your First Printing Application
      Section 11.4.  Printer Settings
      Section 11.5.  The PrintDocument and Print Events
      Section 11.6.  Printing Text
      Section 11.7.  Printing Graphics
      Section 11.8.  Print Dialogs
      Section 11.9.  Customizing Page Settings
      Section 11.10.  Printing Multiple Pages
      Section 11.11.  Marginal Printing: A Caution
      Section 11.12.  Getting into the Details: Custom Controlling and the Print Controller
      SUMMARY
      Chapter 12.  Developing GDI+ Web Applications
      Section 12.1.  Creating Your First ASP.NET Web Application
      Section 12.2.  Your First Graphics Web Application
      Section 12.3.  Drawing Simple Graphics
      Section 12.4.  Drawing Images on the Web
      Section 12.5.  Drawing a Line Chart
      Section 12.6.  Drawing a Pie Chart
      SUMMARY
      Chapter 13.  GDI+ Best Practices and Performance Techniques
      Section 13.1.  Understanding the Rendering Process
      Section 13.2.  Double Buffering and Flicker-Free Drawing
      Section 13.3.  Understanding the SetStyle Method
      Section 13.4.  The Quality and Performance of Drawing
      SUMMARY
      Chapter 14.  GDI Interoperability
      Section 14.1.  Using GDI in the Managed Environment
      Section 14.2.  Cautions for Using GDI in Managed Code
      SUMMARY
      Chapter 15.  Miscellaneous GDI+ Examples
      Section 15.1.  Designing Interactive GUI Applications
      Section 15.2.  Drawing Shaped Forms and Windows Controls
      Section 15.3.  Adding Copyright Information to a Drawn Image
      Section 15.4.  Reading and Writing Images to and from a Stream or Database
      Section 15.5.  Creating Owner-Drawn List Controls
      SUMMARY
      Appendix A.  Exception Handling in .NET
      Section A.1.  Why Exception Handling?
      Section A.2.  Understanding the try...catch Block
      Section A.3.  Understanding Exception Classes
      SUMMARY