GrRectInRegion

Name

GrRectInRegion -- Test if a region contains a rectangle

Synopsis

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

Parameters

region

The region in which you want to test for a point.

x, y

The upper left corner of the rectangle to test.

widht, height

The dimensions of the rectangle to test.

Return Value

Returns one of the following values:

Return ValueDescription
MWRECT_ALLINThe region contains the entire rectangle
MWRECT_PARTINThe region contains part of the rectangle
MWRECT_OUTNo point of the rectangle resides within the region

Description

The GrRectInRegion function checks to see if the region region contains the rectangle defined by the x, y, width, and height parameters, and returns a value based on whether the rectangle resides entirely within the region, only partly in the region or completely outside the region.