【问题标题】:Windows Phone Mango: Making a drawing app with various brushes optionWindows Phone Mango:使用各种画笔选项制作绘图应用程序
【发布时间】:2012-11-19 11:44:23
【问题描述】:

我正在尝试制作一个绘图应用程序。目的很简单。让用户在画布上使用各种画笔选项(如方形画笔、远画笔、铅笔画笔)以及更多类似 android 市场上的任何其他绘图应用程序。目前我可以让用户使用以下代码绘制平滑曲线:

                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;

现在我想要一些自定义画笔选项并让用户使用它进行绘制。我该如何实现? 提前致谢。

【问题讨论】:

    标签: c# windows-phone-7 drawing paint


    【解决方案1】:

    Square、Pencil 等只是用作画笔的自定义图像图案。去ImageBrush

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-30
      • 2019-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多