ContainsR(Rect: IGxRect): Boolean;
Rect. The rectangle that is necessary to check.
The ContainsR method checks if the current rectangle contains the rectangle.
Sub UserProc;
Var
Rect, Rect1: IGxRect;
Begin
Rect := New GxRect.Create(0, 0, 50, 50);
Rect1 := New GxRect.Create(Math.RandBetweenI(-50, 50), Math.RandBetweenI(-50, 50), Math.RandBetweenI(0, 70), Math.RandBetweenI(0, 70));
Debug.WriteLine(Rect.ContainsR(Rect1))
End Sub UserProc;
After executing the example two rectangles are created. The development environment console displays whether the second rectangle is in the first one.
See also: