Summary

In this chapter we discussed some common uses of rectangles and regions. You learned several ways to create Rectangle and RectangleF objects, and how to use the Round, Truncate, Union, Inflate, Ceiling, and Intersect methods in your applications. After that you saw an example of a hit test. Then we discussed the Region class and its members, and how to use Complement, Union, Exclude, Xor, and other methods of the Region class. We also saw a sample of clipping regions. At the end of this chapter we saw an interesting sample application that uses regions to create nonrectangular forms and controls.

Imaging is a vital part of graphics. GDI+ provides rich imaging functionality. We will cover this functionality in Chapter 7.

Get Graphics Programming with GDI+ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.