ContainsP(Point: IGxPoint): Boolean;
Point. The point that should be checked.
The ContainsP method checks if the current rectangle contains the point.
Sub UserProc;
Var
Rect: IGxRect;
Point: IGxPoint;
Begin
Rect := New GxRect.Create(0, 0, 50, 45);
Point := New GxPoint.Create(Math.RandBetweenI(0, 70), Math.RandBetweenI(0, 70));
Debug.WriteLine(Rect.ContainsP(Point))
End Sub UserProc;
After executing the example a rectangle and a point are created. The development environment console displays whether the rectangle contains the point.
See also: