相交的GraphicsPath对象对象、GraphicsPath

2023-09-03 06:46:40 作者:去他妈的爱情

如何相交两(.NET)的GraphicsPath对象?

How can I intersect two (.NET) GraphicsPath objects?

推荐答案

您试图让两个不同的路径所包围的面积?这是一个区域,而不是一个路径:

Are you trying to get the area enclosed by two different paths? That is a Region, not a path:

var rgn1 = new Region(path1);
var intersection = rgn1.Intersect(path2);
rgn1.Dispose();

如果这不是你的意思,你就必须提供更多的信息。

If that is not what you mean, you will have to provide more information.