我试图在 Expression Blend 4 中“绘制”一个简单的圆柱体路径,但我似乎无法完全正确。
(1) 我从加二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
。在我尝试将 aFill="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
可以将 aFill
应用于整个事物的圆柱体。