OffsetP(Point: IGxPointF);
Point. The point, by which coordinates offset is executed.
The OffsetP method offsets the current point by coordinate values of the point passed by the input parameter.
Sub UserProc;
Var
p1, p2: IGxPointF;
Begin
p1 := New GxPoint.Create(10.5, 10.5);
p2 := New GxPoint.Create(Math.RandBetween(-10, 10), Math.RandBetween(-10, 10));
p1.OffsetP(p2);
Debug.WriteLine("X: " + p1.X.ToString + ". Y: " + p1.Y.ToString);
End Sub UserProc;
After executing the example the two points are created. The first point is with fixed coordinates, the second point is with random coordinates. Then coordinates of the first point are offset by the second point coordinate size. The obtained coordinates of the first point are displayed in the development environment console.
See also: