【发布时间】:2013-05-11 21:28:13
【问题描述】:
我有标准 Inkcanvas 的应用程序。标准应用程序看起来像 Figure 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 画笔,如下所示: Figure 2。我想使用 Inkcanvas 和简单的“背景”图像进行绘画 (jpg,png或其他)。有没有简单的制作方法?你能举个例子吗?
在我的应用程序中,我想在标准 Inkcanvas 上绘画,然后转换 Inkcanvas 选择以实现类似于图 2 的效果。(单击按钮后?)
【问题讨论】: