Important: The information in this document is obsolete and should not be used for new development.
OffsetRect
To move a rectangle, use theOffsetRect
procedure.
PROCEDURE OffsetRect (VAR r:\xDDRect; dh,dv:\xDDInteger);
r
- The rectangle to move.
dh
- The horizontal distance to move the rectangle.
dv
- The vertical distance to move the rectangle.
DESCRIPTION
TheOffsetRect
procedure moves the rectangle that you specify in ther
parameter by adding the value you specify in thedh
parameter to each of its horizontal coordinates and the value you specify in thedv
parameter to each of its vertical coordinates. If thedh
anddv
parameters are positive, the movement is to the right and down; if either is negative, the corresponding movement is in the opposite direction. The rectangle retains its shape and size; it's merely moved on the coordinate plane. The movement doesn't affect the screen unless you subsequently call a routine to draw within the rectangle.