Important: The information in this document is obsolete and should not be used for new development.
OffsetRgnTo move a region, use the
PROCEDURE OffsetRgn (rgn:\xDDRgnHandle; dh,dv:\xDDInteger);
- A handle to the region to move.
- The horizontal distance to move the region.
- The vertical distance to move the region.
OffsetRgnprocedure moves the region whose handle you pass in the
rgnparameter by adding the value you specify in the
dhparameter to the horizontal coordinates of all points of its region boundary, and by adding the value you specify in the
dvparameter to the vertical coordinates of all points of its region boundary. If the values of
dvare positive, the movement is to the right and down; if either is negative, the corresponding movement is in the opposite direction. The region retains its size and shape. This doesn't affect the screen unless you subsequently call a routine to draw the region.
OffsetRgnprocedure is an especially efficient operation, because most of the data defining a region is stored relative to the
rgnBBoxfield in its
Regionrecord and so isn't actually changed by