Important: The information in this document is obsolete and should not be used for new development.
InsetRect
To shrink or expand a rectangle, use theInsetRect
procedure.
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
TheInsetRect
procedure shrinks or expands the rectangle that you specify in ther
parameter: the left and right sides are moved in by the amount you specify in thedh
parameter; the top and bottom are moved toward the center by the amount you specify in thedv
parameter. If the value you pass indh
ordv
is negative, the appropriate pair of sides is moved outward instead of inward. The effect is to alter the size by2*dh
horizontally and2*dv
vertically, 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).