Admin Production ni-theme
Current Publication

RectContainsPoint

LabWindows/CVI

RectContainsPoint

int RectContainsPoint (Rect rect, Point point);

Purpose

Returns 1 if the specified rectangle encloses the point you specify. The function returns 0 otherwise.

The rectangle is considered to enclose the point if the point is in the interior of the rectangle or on its frame.

Parameters

Input
Name Type Description
rect Rect The location and size of a rectangle.
point Point The location of the center of the rectangle.

Return Value

Name Type Description
containsPoint int Indicates if rect contains point.

Code Description
1 point is in the interior or on the frame of the rectangle specified by rect.
0 point is outside the frame of the rectangle specified by rect.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later

Example

Refer to userint\colview.cws for an example of using the RectContainsPoint function.