Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

30: Introduction to GDI+ > Advanced Capabilities of GDI+

Advanced Capabilities of GDI+

I have only just touched on the many capabilities of GDI+. There is much more that you can do with it — far more than can be achieved in a single chapter. However, to round off this chapter, I will introduce several areas of these advanced capabilities.

Clipping

There are three contexts where clipping is important.

First, when the OnPaint() method is called, in addition to the Graphics object, the event is passed a clipping rectangle. For simple drawing routines, you don't need to pay much attention to this clipping rectangle, but if you have a very elaborate drawing routine that takes a lot of time, you can reduce this drawing time by testing against this clipping rectangle before you draw. You know the bounding rectangle of whatever graphic or figure that you need to draw. If this bounding rectangle does not intersect with the clipping rectangle, then you can skip the drawing operation.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint