Important: The information in this document is obsolete and should not be used for new development.
Region
You can use a region, which is a data structure of typeRegion, to define an arbitrary area or set of areas on the QuickDraw coordinate plane. For example, when scrolling through a window, your application must initialize an update region and pass its handle to theScrollRectprocedure (which is described on page 2-40).The data structure for a region consists of two fixed-length fields followed by a variable-length field.
TYPE RgnHandle = ^RgnPtr; RgnPtr = ^Region; Region = RECORD rgnSize:\xDD\xDDInteger; {size in bytes} rgnBBox:\xDD\xDDRect; {enclosing rectangle} {more data if region is not rectangular} END;The maximum size of a region is 32 KB when using basic QuickDraw, 64 KB when using Color QuickDraw. The simplest region is a rectangle. In this case, the
Field Description
rgnSize- The region's size in bytes.
rgnBBox- The rectangle that bounds the region.
rgnBBoxfield defines the entire region, and there's no optional region data. For rectangular regions (or empty regions), thergnSizefield contains 10.Region data is stored in a proprietary format.
See the chapter "QuickDraw Drawing" for descriptions of the QuickDraw routines you can use for calculating and manipulating regions for drawing purposes.