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 theSetRectRgnprocedure.
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
TheSetRectRgnprocedure destroys the previous structure of the region whose handle you pass in thergnparameter, and it then sets the new structure to the rectangle that you specify in theleft,top,right, andbottomparameters. If you specify an empty rectangle (that is,right<=leftorbottom<=top), theSetRectRgnprocedure sets the region to the empty region defined by the rectangle (0,0,0,0).As an alternative to the
SetRectRgnprocedure, you can change the structure of an existing region to that of a rectangle by using theRectRgnprocedure, which accepts as a parameter a rectangle instead of four coordinates. TheRectRgnprocedure is described next.SPECIAL CONSIDERATIONS
TheSetRectRgnprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.