標準の Inkcanvas を使用したアプリケーションがあります。標準アプリケーションは 図 1のようになり、すべてのアプリケーション コード (XAML) は次のようになります。
<Window x:Class="WpfApplication18.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<InkCanvas>
<InkCanvas.DefaultDrawingAttributes>
<DrawingAttributes x:Name="attribute" Width="40" Height="40" Color="BlueViolet" />
</InkCanvas.DefaultDrawingAttributes>
</InkCanvas>
</Grid>
次のように、非標準の Inkcanvas ブラシをイメージ (イメージ マスク?) で作成する方法を考えてい ます。Inkcanvas と単純な「背景」画像 (jpg、png など) を使用してペイントしたいと考えています。簡単な作り方はありますか?コードで例を挙げてもらえますか?
私のアプリケーションでは、標準の Inkcanvas にペイントし、その後 Inkcanvas の選択を変換して、この図 2 のようなものを実現したいと考えています。 (ボタンをクリックした後?)