OffsetP(Point: IGxPointF);
Point. The point, by which coordinates the offset is made.
The OffsetP method offsets the real rectangle by the values of coordinates of the point passed by the input parameter.
Sub UserProc;
Var
r1: IGxRectF;
p1: IGxPointF;
Begin
r1 := New GxRectF.Create(0, 0, 10, 10);
p1 := New GxPointF.Create(Math.RandBetween(-10, 10), Math.RandBetween(-10, 10));
r1.OffsetP(p1);
Debug.WriteLine("Left: " + r1.Left.ToString + ". Top: " + r1.Top.ToString);
End Sub UserProc;
After executing the example a new real rectangle and a real point are created. The point is created with random coordinates. Then rectangle coordinates are offset by point coordinates. The obtained coordinates of the rectangle's left top side are displayed in the development environment console.
See also: