Chapter 6. Rectangles and Regions

In previous chapters we discussed rectangles and how to draw and fill them using the draw and fill methods of the Graphics class. In this chapter we will discuss additional functionality of rectangles and regions.

We will cover the following key topics:

  • .NET Framework objects that work with rectangles and regions and their members

  • Graphics class members that work with rectangles and regions

  • Writing applications using objects

  • The Rectangle structure and its members

  • The Region class and its members

  • Invalidating and clipping regions

  • Examples of real-world applications using regions and rectangles

A rectangle has three properties: starting point, height, and width. Figure 6.1 shows these properties where the starting ...

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.