private void OnTouchEnded(object sender, EventArgs e) { TouchStroke stroke = CurrentStroke; CurrentStroke = null; if (stroke != null) { StrokeFinished?.Invoke(this, new TouchStrokeEventArgs(stroke)); } }
private void OnTouchMoved(object sender, RawTouchEventArgs e) { TouchStroke stroke = CurrentStroke; if (stroke != null) { stroke.AddPoint(e.Location); StrokeChanged?.Invoke(this, EventArgs.Empty); } }
private void OnTouchStarted(object sender, EventArgs e) { CurrentStroke = new TouchStroke(TouchArea); _strokes.Add(CurrentStroke); }
/// <summary> /// Clears all stored strokes. /// </summary> public void ClearStrokes() { CurrentStroke = null; _strokes.Clear(); }