public void FinishDrawingStroke(StylusPoint endPoint) { if (Drawing) { activePoints.Add(endPoint); PointerStrokeDrawn(activeStroke); activeStroke.Fade(dispatcher, (x) => signedStrokes.Remove(x)); Drawing = false; activePoints = null; activeStroke = null; } else { throw new NotSupportedException("Not drawing a stroke. Failed to finish the drawing."); } }
public void AddSignedPointerStroke(SignedPointerStroke pointer) { canvas.Dispatcher.Invoke(new Action(() => canvas.Strokes.Add(pointer))); pointer.Fade(canvas.Dispatcher, (x) => canvas.Strokes.Remove(x)); }