Important: The information in this document is obsolete and should not be used for new development.
SetRectRgn
To change the structure of an existing region to that of a rectangle, you can use theSetRectRgn
procedure.
PROCEDURE SetRectRgn (rgn:\xDDRgnHandle; left,top,right,bottom: Integer);
rgn
- A handle to the region to restructure as a rectangle.
left
- The horizontal coordinate of the upper-left corner of the rectangle to set as the new region.
top
- The vertical coordinate of the upper-left corner of the rectangle to set as the new region.
right
- The horizontal coordinate of the lower-right corner of the rectangle to set as the new region.
bottom
- The vertical coordinate of the lower-right corner of the rectangle to set as the new region.
DESCRIPTION
TheSetRectRgn
procedure destroys the previous structure of the region whose handle you pass in thergn
parameter, and it then sets the new structure to the rectangle that you specify in theleft
,top
,right
, andbottom
parameters. If you specify an empty rectangle (that is,right
<=left
orbottom
<=top
), theSetRectRgn
procedure sets the region to the empty region defined by the rectangle (0,0,0,0).As an alternative to the
SetRectRgn
procedure, you can change the structure of an existing region to that of a rectangle by using theRectRgn
procedure, which accepts as a parameter a rectangle instead of four coordinates. TheRectRgn
procedure is described next.SPECIAL CONSIDERATIONS
TheSetRectRgn
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.