IGxRect.Equals

Syntax

Equals(Rect: IGxRect): Boolean;

Parameters

Rect. Integer rectangle that is compared with.

Description

The Equals method checks if the current integer rectangle is equal to the rectangle passed by the input parameter.

Example

Sub UserProc;
Var
    r1, r2: IGxRect;
Begin
    r1 := New GxRect.Create(00, Math.RandBetweenI(02), Math.RandBetweenI(02));
    r2 := New GxRect.Create(00, Math.RandBetweenI(02), Math.RandBetweenI(02));
    Debug.WriteLine("Width 1: " + r1.Width.ToString + ". Height 1: " + r1.Height.ToString);
    Debug.WriteLine("Width 2: " + r2.Width.ToString + ". Height 2: " + r2.Height.ToString);
    Debug.WriteLine(r1.Equals(r2));
End Sub UserProc;

After executing the example two rectangles are created. Width, height, and comparison result of the rectangles are displayed in the development environment console.

See also:

IGxRect