GrRectInRegion()

Name

GrRectInRegion() -- Test for rectangle in region

Synopsis

int GrRectInRegion ( GR_REGION_ID region , GR_COORD x , GR_COORD y , GR_COORD width , GR_COORD height );

Description

This function tests to see if the specified rectangle (x, y, width, height) is contained within (or partially contained within) the specified region.

Parameters

TypeNameDescription
GR_REGION_IDregionThe ID of the region to test.
GR_COORDxThe X coordinate of the rectangle.
GR_COORDyThe Y coordinate of the rectangle.
GR_COORDwThe width of the rectangle in pixels.
GR_COORDhThe height of the rectangle in pixels.

Returns

This function returns on of the following values:

ValueDescription
GR_RECT_OUTIf the rectangle is completely outside the region.
GR_RECT_ALLINIf the rectangle is completely inside the region.
GR_RECT_PARTINIf the rectangle is partially within the region.

See Also

GrPointInRegion(), GrEmptyRegion(), GrEqualRegion(),