Windows Phone Mango: Making a drawing app with various brushes option
Posted
by
Md. Abdul Munim
on Stack Overflow
See other posts from Stack Overflow
or by Md. Abdul Munim
Published on 2012-11-18T16:57:23Z
Indexed on
2012/11/18
16:59 UTC
Read the original article
Hit count: 280
I am trying to make a drawing app. The purpose is simple. Let the user draw something on a canvas with various brush options like square brush,far brush,pencil brush and many more like any other drawing app available in android market. At present I can let the user draw smooth curves using following code:
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;
Now I want some custom brush options and let the user draw using that.How can I achieve that? Thanks in advance.
© Stack Overflow or respective owner