1
我需要構造環的方法(從中切出一個較小半徑的圓),並將其作爲System.Windows.Shapes.Shape
返回。我可以用Path
來做到這一點嗎?可能存在另一種方式?在C#上構造一個形狀爲環的形狀
我需要構造環的方法(從中切出一個較小半徑的圓),並將其作爲System.Windows.Shapes.Shape
返回。我可以用Path
來做到這一點嗎?可能存在另一種方式?在C#上構造一個形狀爲環的形狀
你可以使用一個非常粗的筆畫的橢圓,但透明的填充?誠然,如果你想環本身的邊緣,以不同的顏色來填充部分不起作用......
另外,我開始尋找包含在GeometryGroup
2個EllipseGeometry
元素有一個Path
FillRule
的EvenOdd
或CombineGeometry
與GeometryCombineMode
的Exclude
。例如:
<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
<Path.Data>
<CombinedGeometry GeometryCombineMode="Exclude">
<CombinedGeometry.Geometry1>
<EllipseGeometry RadiusX="100" RadiusY="100" Center="125,125" />
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<EllipseGeometry RadiusX="50" RadiusY="50" Center="125,125" />
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
</Path>
產生以下:
難道我說得對,就是你是什麼之後?
這就是我需要的。謝謝。 – AndreyAkinshin 2010-11-14 06:25:35