IGxRectF.OffsetP

Syntax

OffsetP(Point: IGxPointF);

Parameters

Point. The point, by which coordinates the offset is made.

Description

The OffsetP method offsets the real rectangle by the values of coordinates of the point passed by the input parameter.

Example

Sub UserProc;
Var
    r1: IGxRectF;
    p1: IGxPointF;
Begin
    r1 := New GxRectF.Create(001010);
    p1 := New GxPointF.Create(Math.RandBetween(-1010), Math.RandBetween(-1010));
    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:

IGxRectF