我正试着制作一个绘图应用程序。目的很简单。让用户在画布上画一些东西,有各种画笔选项,如正方形刷、远刷、铅笔刷等等,就像安卓市场上的任何其他绘图应用程序一样。目前,我可以让用户使用以下代码绘制平滑曲线:
currentPoint = e.GetPosition(this.canvas);
Line line = new Line() { X1 = currentPoint.X, Y1 = currentPoint.Y, X2 = oldPoint.X, Y2 = oldPoint.Y };
line.Stroke = new SolidColorBrush(Colors.Purple);
line.StrokeThickness = 2;
this.drawnImage.Add(line);
this.canvas.Children.Add(line);
oldPoint = currentPoint;现在我想要一些自定义画笔选项,让用户使用that.How绘制,我能实现吗?提前谢谢。
发布于 2012-11-19 03:44:23
方格、铅笔等仅仅是用作画笔的自定义图像图案。和ImageBrush一起去
https://stackoverflow.com/questions/13442297
复制相似问题