Adding Geometry objects data wpf
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);
精彩评论