IGxRect.OffsetP

Syntax

OffsetP(Point: IGxPoint);

Parameters

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

Description

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

Example

Sub UserProc;
Var
    r1: IGxRect;
    p1: IGxPoint;
Begin
    r1 := New GxRect.Create(001010);
    p1 := New GxPoint.Create(Math.RandBetweenI(-1010), Math.RandBetweenI(-1010));
    r1.OffsetP(p1);
    Debug.WriteLine("Left: " + r1.Left.ToString + ". Top: " + r1.Top.ToString);
End Sub UserProc;

After executing the example an integer rectangle and a 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:

IGxRect