OffsetS(Size: IGxSizeF);
Size. The size, by which offset is executed.
The OffsetS method offsets the real rectangle by the size passed by the input parameter.
Sub UserProc;
Var
r1: IGxRect;
s1: IGxSize;
Begin
r1 := New GxRect.Create(0, 0, 10, 10);
s1 := New GxSize.Create(Math.RandBetweenI(0, 10), Math.RandBetweenI(0, 10));
r1.OffsetS(s1);
Debug.WriteLine("Left: " + r1.Left.ToString + ". Top: " + r1.Top.ToString);
End Sub UserProc;
After executing the example a real rectangle and a size are created. Then rectangle coordinates are offset by the created size. The obtained coordinates of the left and top rectangle side are displayed in the console.
See also: