IGxRect.Contains

Syntax

Contains(X: Integer; Y: Integer): Boolean;

Parameters

X. The X coordinate of the point.

Y. The Y coordinate of the point.

Description

The Contains method checks if the current rectangle contains a point with specified coordinates.

Comments

The method returns True if the point with X and Y coordinates is in the integer rectangle area, and False if the point is missing.

Example

Sub UserProc;
Var
    Rect: IGxRect;
Begin
    Rect := New GxRect.Create(001010);
    Debug.WriteLine(Rect.Contains(Math.RandBetweenI(-1020), Math.RandBetweenI(-1020)));
End Sub UserProc;

After executing the example a rectangle is created. The development environment console displays whether the rectangle contains a point with random coordinates.

See also:

IGxRect