Rect.intersection

Computes the intersection of the two given rectangles.

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.

class Rect
bool
intersection
(,
out Rect res
)

Parameters

b Rect

a #graphene_rect_t

res Rect

return location for a #graphene_rect_t

Return Value

Type: bool

true if the two rectangles intersect

Meta