IGxPointF.OffsetP

Syntax

OffsetP(Point: IGxPointF);

Parameters

Point. The point, by which coordinates offset is executed.

Description

The OffsetP method offsets the current point by coordinate values of the point passed by the input parameter.

Example

Sub UserProc;
Var
    p1, p2: IGxPointF;
Begin
    p1 := New GxPoint.Create(10.510.5);
    p2 := New GxPoint.Create(Math.RandBetween(-1010), Math.RandBetween(-1010));
    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:

IGxPointF