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