intersect


Description:

public bool intersect (Rectangle src2, out Rectangle dest)

Calculates the intersection of two rectangles.

It is allowed for dest to be the same as either this or src2. If the rectangles do not intersect, dest’s width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass null for dest.

Parameters:

this

a Rectangle

src2

a Rectangle

dest

return location for the intersection of this and src2, or null

Returns:

true if the rectangles intersect.