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

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

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