InflateRect (Delphi)
Description
The following code example illustrates the usage of the InflateRect routine.
Code
var
aRectangle: TRect;
...
{ Rectangle created with coordinates: (Parameter order: Left, Top, Right, Bottom) }
aRectangle:= TRect.Create(2, 4, 7, 8);
InflateRect(aRectangle, 1, 2);
WriteLn(aRectangle.Left,' ',aRectangle.Top,' ',aRectangle.Right,' ',aRectangle.Bottom);
{
New values of coordinates:
Left = 2-1 ; Top = 4-2; Right = 7+1; Bottom = 8+2.
}
Note: The coordinates of the plan start in the upper-left corner of the screen from (0,0).