Equals(Rect: IGxRect): Boolean;
Rect. Integer rectangle that is compared with.
The Equals method checks if the current integer rectangle is equal to the rectangle passed by the input parameter.
Sub UserProc;
Var
r1, r2: IGxRect;
Begin
r1 := New GxRect.Create(0, 0, Math.RandBetweenI(0, 2), Math.RandBetweenI(0, 2));
r2 := New GxRect.Create(0, 0, Math.RandBetweenI(0, 2), Math.RandBetweenI(0, 2));
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: