Rectangle.Intersect Method (Rectangle, Rectangle, Rectangle)
Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.
Syntax
'Declaration
Public Shared Sub Intersect ( _
ref value1 As Rectangle, _
ref value2 As Rectangle, _
out result As Rectangle _
)
public static void Intersect (
ref Rectangle value1,
ref Rectangle value2,
out Rectangle result
)
public:
static void Intersect(
ref Rectangle value1,
ref Rectangle value2,
out Rectangle result
)
Parameters
- value1
Type: Rectangle
The first Rectangle to compare. - value2
Type: Rectangle
The second Rectangle to compare. - result
Type: Rectangle
[OutAttribute] The area where the two first parameters overlap.
Remarks
If the two rectangles do not overlap, the resulting Rectangle will be empty.
Requirements
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
See Also
Reference
Rectangle Structure
Rectangle Members
Microsoft.Xna.Framework Namespace
Platforms
Windows Phone