我想在Expression Blend 4中「繪製」一個簡單的柱面路徑,而且我似乎無法完全理解它。在Expression Blend 4中繪製柱面路徑
(1)I開始了通過添加兩個Ellipses
和一個Rectangle
:
<Grid Background="Transparent">
<Ellipse Fill="Transparent" Height="13.25" Margin="352,0,352,227" Stroke="Black" VerticalAlignment="Bottom"/>
<Rectangle Fill="Transparent" Margin="352,216,352,233" Stroke="Black"/>
<Ellipse Fill="Transparent" Height="13.25" Margin="352,209.625,352,0" Stroke="Black" VerticalAlignment="Top"/>
</Grid>
(2)接着,我所選擇的底Ellipse
和Rectangle
,並進行了Combine -> Unite
:
<Grid Background="Transparent">
<Path Data="M0.5,0.5 L47.5,0.5 47.5,47.375 47.5,47.5 47.493931,47.5 47.492325,47.533089 C47.170608,50.84277 36.775898,53.5 24,53.5 11.2241,53.5 0.82939076,50.84277 0.50767487,47.533089 L0.50606853,47.5 0.5,47.5 0.5,47.375 z" Fill="Transparent" Margin="352,216,352,227" Stretch="Fill" Stroke="Black"/>
<Ellipse Fill="Transparent" Height="13.25" Margin="352,209.625,352,0" Stroke="Black" VerticalAlignment="Top"/>
</Grid>
(3)接下來,我選擇了頂部Ellipse
和Path
從步驟2得到,然後執行Path -> Make Compound Path
。然後用直接選擇工具,我刪除了頂部的Ellipse
。它看起來不錯,直到我嘗試並將Fill="Green"
應用於Path
。
<Grid Background="Transparent">
<Path Fill="Green" Data="M47.5,6.875 L47.5,53.75 47.5,53.875 47.493931,53.875 47.492325,53.908089 C47.170608,57.21777 36.775898,59.875 24,59.875 11.2241,59.875 0.82939076,57.21777 0.50767487,53.908089 L0.50606853,53.875 0.5,53.875 0.5,53.75 0.5,6.875 M47.5,6.625 C47.5,10.007744 36.978692,12.75 24,12.75 11.021308,12.75 0.5,10.007744 0.5,6.625 0.5,3.2422559 11.021308,0.5 24,0.5 36.978692,0.5 47.5,3.2422559 47.5,6.625 z" Margin="352,209.625,352,227" Stretch="Fill" Stroke="Black"/>
</Grid>
我已經試過各種操作,但我不能爲我的生活弄清楚如何獲得一個圓柱形Path
在那裏我可以申請Fill
到整個事情。
看起來不錯!你是親手做這個的嗎?你用什麼方法提出幾何? –
是的,這是手工完成的。你只需要讓自己熟悉[路徑標記語法](http://msdn.microsoft.com/en-us/library/ms752293.aspx)。 – Clemens
如果你得到一個小圓線伸出圓圈的終點,它可以通過添加StrokeLineJoin =「斜角」 – Tom