IGxRectF.Contains

Syntax

Contains(X: Double; Y: Double): 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 the X and Y coordinates is contained in the real rectangle's area, and False if the point is absent.

Example

Sub UserProc;
Var
    Rect: IGxRectF;
Begin
    Rect := New GxRectF.Create(0010.510.5);
    Debug.WriteLine(Rect.Contains(Math.RandBetween(-1020), Math.RandBetween(-1020)));
End Sub UserProc;

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

See also:

IGxRectF