且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WPF路径冲突检测?

更新时间:2023-02-26 13:44:37

您应该能够通过

You should be able to get the intersection of two Paths by the FillContainsWithDetail method of their geometries:

var intersectionDetail = path1.Data.FillContainsWithDetail(path2.Data);

if (intersectionDetail != IntersectionDetail.NotCalculated &&
    intersectionDetail != IntersectionDetail.Empty)
{
    // collision
}