InkCanvasコントロールを配置し、半透明な色でお絵かきしています。
以下のイメージに示す通り、#という文字を描いたときに
各線と線の重なりの部分の色が濃くなってしまいます。
半透明な色を維持しつつ、重なった部分も均一な色で塗ることはできますでしょうか。
xaml
1<Window x:Class="OpacityTest.MainWindow" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 5 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 6 xmlns:local="clr-namespace:OpacityTest" 7 mc:Ignorable="d" 8 Title="MainWindow" Height="450" Width="800"> 9 <Grid> 10 <InkCanvas> 11 <InkCanvas.DefaultDrawingAttributes> 12 <DrawingAttributes Color="#7FFF0000" Width="100" Height="100" /> 13 </InkCanvas.DefaultDrawingAttributes> 14 </InkCanvas> 15 16 </Grid> 17</Window> 18
■追記
他の色が重なった場合について
他の色を使う場合も、同じ透過度の別の色(?)を使います。
重なった場合は濃くならず薄いまま(同じ透過度のまま)色が混じると理想的です。
回答2件
あなたの回答
tips
プレビュー