Rectangle.Intersect Method (Rectangle, Rectangle, Rectangle)

Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public static void Intersect (
         ref Rectangle value1,
         ref Rectangle value2,
         out Rectangle result
)

Parameters

value1
The first Rectangle to compare.
value2
The second Rectangle to compare.
result
[OutAttribute] The area where the two first parameters overlap.

If the two rectangles do not overlap, the resulting Rectangle will be empty.

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7

Community Additions

ADD
Show: