Example #1
0
        private void OnTouchEnded(object sender, EventArgs e)
        {
            TouchStroke stroke = CurrentStroke;

            CurrentStroke = null;
            if (stroke != null)
            {
                StrokeFinished?.Invoke(this, new TouchStrokeEventArgs(stroke));
            }
        }
Example #2
0
        private void OnTouchMoved(object sender, RawTouchEventArgs e)
        {
            TouchStroke stroke = CurrentStroke;

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