public override void OnMouseMove(InkCanvas inkCanvas, System.Windows.Input.MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { var p = e.GetPosition(inkCanvas); if (p != point) { point = p; GetBrush(pts, (s) => { if (StrokeResult != null) inkCanvas.Strokes.Remove(StrokeResult); DrawingAttributes drawingAttributes = new DrawingAttributes { Color = inkCanvas.DefaultDrawingAttributes.Color, Width = inkCanvas.DefaultDrawingAttributes.Width, StylusTip = StylusTip.Ellipse, IgnorePressure = true, FitToCurve = true }; StrokeResult = new BrushStroke(s, drawingAttributes); inkCanvas.Strokes.Add(StrokeResult); } ); } } }
public override void OnMouseMove(InkCanvas inkCanvas, System.Windows.Input.MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { var p = e.GetPosition(inkCanvas); if (p != point) { point = p; GetBrush(pts, (s) => { if (StrokeResult != null) { inkCanvas.Strokes.Remove(StrokeResult); } DrawingAttributes drawingAttributes = new DrawingAttributes { Color = inkCanvas.DefaultDrawingAttributes.Color, Width = inkCanvas.DefaultDrawingAttributes.Width, StylusTip = StylusTip.Ellipse, IgnorePressure = true, FitToCurve = true }; StrokeResult = new BrushStroke(s, drawingAttributes); inkCanvas.Strokes.Add(StrokeResult); } ); } } }