如何在WPF中分割形状/几何 [英] How to divide a shape/Geometry in wpf
本文介绍了如何在WPF中分割形状/几何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是如何将形状分为子形状.例如,看起来像8的形状将细分为两个椭圆形.
我非常确定这是可能的,因为该框架似乎是在内部进行的.对于PathGeometries
,根据选择EvenOdd
或NonZero
FillRules
会有不同的行为.
答案将是巨大的,但即使是一些尝试的想法也将受到赞赏.
谢谢
Ken
My question is how do you divide a shape into it''s subshapes. For example a shape that looked like an 8 would be subdivided into two ovalish shapes.
I am pretty sure that this is possible as the framework seems to be doing it internally. With PathGeometries
there are different behaviors based on the choosing the EvenOdd
or NonZero
FillRules
.
An answer would be great, but even some ideas to try would be appreciated.
Thanks
Ken
推荐答案
以编程方式,您可能会但不能为您提供很多起点.
至于在Blend中,您可以采用形状并将其转换为路径.有了路径后,您可以将路径剪切"为多个部分,然后从那里开始.希望对您有所帮助.
Programmatically, you probably could but can''t provide you much of a starting point.
As for in Blend, you can take a shape and convert it to a path. Once you have a path, you can ''Cut'' the path into multiple sections and go from there. I hope that helps.
您可以复制形状,然后为每个形状覆盖一个覆盖一半形状的不透明蒙版.不确定这是否是最好的方法,但我想它会起作用.
You could duplicate the shape then give each an opacity mask that covers half the shape. Not sure that''s the best way of doing it, but I imagine it would work.
这篇关于如何在WPF中分割形状/几何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文