我有图像。我想为图像制作模糊边缘。我可以在 Image.OpacityMask 上仅添加一个 LinearGradientBrush 并仅制作水平或仅垂直模糊边缘:
<Image Height="300" Width="450" Name="oldImg" Source="/untitled.jpg">
<Image.OpacityMask>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="Transparent"></GradientStop>
<GradientStop Offset=".3" Color="Black"></GradientStop>
<GradientStop Offset=".7" Color="Black"></GradientStop>
<GradientStop Offset="1" Color="Transparent"></GradientStop>
</LinearGradientBrush>
</Image.OpacityMask>
</Image>
如何结合垂直和水平的lineargradientbrush?