Offset(DX: Integer; DY: Integer);
DX. Offset by X axis.
DY. Offset by Y axis.
The Offset method offsets the rectangle by the specified X and Y axis coordinates.
Sub UserProc;
Var
r1: IGxRect;
Begin
r1 := New GxRect.Create(0, 0, 100, 100);
// Offset
r1.Offset(30, 30);
Debug.WriteLine("Left: " + r1.Left.ToString + ". Top: " + r1.Top.ToString);
End Sub UserProc;
After executing the example an integer rectangle is created. Then the rectangle is offset along the X and Y axes. The obtained coordinates of the rectangle's left top side are displayed in the development environment console.
See also: