Rect.intersection

bool intersection(graphene.rect.Rect b, out graphene.rect.Rect res)

Computes the intersection of the two given rectangles.

![](rectangle-intersection.png)

The intersection in the image above is the blue outline.

If the two rectangles do not intersect, res will contain a degenerate rectangle with origin in (0, 0) and a size of 0.

Parameters

ba #graphene_rect_t
resreturn location for a #graphene_rect_t

Returns

true if the two rectangles intersect