3

我在 WPF 应用程序中有两个矩形。如何检查矩形是否相交?

4

3 回答 3

8
if (rectangle1.IntersectsWith(rectangle2))
{
   // Do something
}

Rect.IntersectWith

于 2012-12-14T07:57:21.353 回答
4

Rect.IntersectsWith可能是你要找的东西?

于 2012-12-14T07:59:31.163 回答
0

试试这个IntersectsWith方法。

于 2012-12-14T08:00:13.820 回答