Important: The information in this document is obsolete and should not be used for new development.
InsetRect
To shrink or expand a rectangle, use theInsetRectprocedure.
PROCEDURE InsetRect (VAR r:\xDDRect; dh,dv:\xDDInteger);
r- The rectangle to alter.
dh- The horizontal distance to move the left and right sides in toward or outward from the center of the rectangle.
dv- The vertical distance to move the top and bottom sides in toward or outward from the center of the rectangle.
DESCRIPTION
TheInsetRectprocedure shrinks or expands the rectangle that you specify in therparameter: the left and right sides are moved in by the amount you specify in thedhparameter; the top and bottom are moved toward the center by the amount you specify in thedvparameter. If the value you pass indhordvis negative, the appropriate pair of sides is moved outward instead of inward. The effect is to alter the size by2*dhhorizontally and2*dvvertically, with the rectangle remaining centered in the same place on the coordinate plane.If the resulting width or height becomes less than 1, the rectangle is set to the empty rectangle (0,0,0,0).