Admin Production ni-theme
Current Publication

PointPinnedToRect

LabWindows/CVI

PointPinnedToRect

void PointPinnedToRect (Point point, Rect rect, Point *pinnedPoint);

Purpose

Ensures that a point is within the rectangular area you specify. If the point is already enclosed by the rectangle, the location of the point remains unchanged. If the point is outside the rectangle, its location is set to the nearest point on the edge of the rectangle.

The function does not modify the Point structure that contains the original location; it stores the calculated location in pinnedPoint.

Parameters

Input
Name Type Description
point Point Point structure that specifies the original location of the point.
rect Rect Rect structure that specifies the rectangle to which the point is pinned.
Output
Name Type Description
pinnedPoint Point Point structure in which to store the calculated location.

Return Value

None.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later