开发者

Adding Geometry objects data wpf

开发者 https://www.devze.com 2022-12-12 10:01 出处:网络
Just wondering if this is possible in wpf, Say we have a Path object p1 with geometry = g1 (same as p1.Data).

Just wondering if this is possible in wpf,

Say we have a Path object p1 with geometry = g1 (same as p1.Data).

Similarly if we have another Path object p2 with geometry = g2 (same as p2.Data).

Now if we开发者_开发知识库 would like to know what is g2-g1 (same as p2.Data - p1.Data) is it possible.

How about g1+g2?

Please let me know if you have any suggestions.


Use a CombinedGeometry object, which I'm doing to make a single mask out of shapes drawn with the DrawTools library.

var added = new CombinedGeometry(GeometryCombineMode.Union, g2, g1);
var subtracted = new CombinedGeometry(GeometryCombineMode.Exclude, g2, g1);
0

精彩评论

暂无评论...
验证码 换一张
取 消