Equals(Rect: IGxRectF): Boolean;
Rect. Real rectangle that is compared with.
The Equals method checks if the current real rectangle is equal to the rectangle passed by the input parameter.
Sub UserProc;
Var
r1, r2: IGxRectF;
Begin
r1 := New GxRectF.Create(0, 0, Math.RandBetween(0, 2), Math.RandBetween(0, 2));
r2 := New GxRectF.Create(0, 0, Math.RandBetween(0, 2), Math.RandBetween(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 real rectangles are created. Width, height, and comparison result of the rectangles are displayed in the development environment console.
See also: