SetRectRgn
SetRectRgn
Set region to rectangle, specifying 4 coordinates void SetRectRgn(theRgn, left, top, right, bottom ); RgnHandle theRgn ; region to modify; it must already exist short left ; the four sides . . .
short top ; of the rectangle . . .
short right ; in local . . .
short bottom ; coordinates
SetRectRgn performs the common operation of defining a rectangular region. The new region shape is specified by coordinates of the four sides of a
rectangle.
theRgn is the handle of a region. It must already have been created via
top specify the position of the top-left corner of the rectangle.
right and . .
bottom specify the position of the bottom-right corner of the rectangle.
Notes: This function discards the current structure of a region and sets it to
define a rectangular area. It is functionally equivalent to:
SetRect( &tempRect, left,top, right,bottom ); Note that you must call NewRgn to allocate the handle's master pointer and If invalid coordinates are used (i.e., bottom <=top or right <=left ),
SetRectRgn sets the region's structure to the empty rectangle (0,0)(0,0).
The RectRgn function does the same thing, but uses the address of an existing rectangle as its parameter.