Deflate(DX: Double; DY: Double);
DX. Change by width.
DY. Change by height.
The Deflate method decreases the size of the real rectangle by the specified width and height values.
Sub UserProc;
Var
Rect: IGxRectF;
Begin
Rect := New GxRectF.Create(0, 0, Math.RandBetween(0, 60), Math.RandBetween(0, 60));
Rect.Deflate(10, 10);
Debug.WriteLine("New width: " + Rect.Width.ToString + ". New height: " + Rect.Height.ToString);
End Sub UserProc;
After executing the example a real rectangle with random size is created. Then the rectangle's size is decreased. The obtained rectangle width and height are displayed in the development environment console.
See also: