int RectIntersection (Rect rect1, Rect rect2, Rect *intersectionRect);
Returns an indication of whether the two rectangles you specify intersect. If they do, the function fills in a Rect structure describing the intersection area.
This function also calculates the largest rectangle that is enclosed by the two specified rectangles.
Input | ||
Name | Type | Description |
rect1 | Rect | The location and size of a rectangle. |
rect2 | Rect | The location and size of a rectangle. |
Output | ||
Name | Type | Description |
intersectionRect | Rect | Rect structure that specifies the largest rectangle enclosed by both rect1
and rect2. If rect1 and rect2 do not intersect, this parameter is set to an empty rectangle with height and width less than or equal to zero. You can pass NULL for this parameter. |
Name | Type | Description | ||||||
rectsIntersect | integer | Indicates if rect1 and rect2 intersect, in other words,
have any points in common.
|