Paint.PaintApp.HandleInput C# (CSharp) Method

HandleInput() private method

Handles any user input. Collect all gestures made since the last 'update' - stores these ready to be handled by the Canvas for drawing
private HandleInput ( ) : void
return void
        private void HandleInput()
        {
            while (TouchPanel.IsGestureAvailable)
            {
                // read the next gesture from the queue
                GestureSample gesture = TouchPanel.ReadGesture();

                TouchType touchType = this.ConvertGestureType(gesture.GestureType);

                TouchPointSizeColour touchPoint = new TouchPointSizeColour(
                    gesture.Position,
                    touchType,
                    this.paintToolBox.Color,
                    this.paintToolBox.Brush);

                // First check if this can be handled by the toolbox - if not then we will keep for the canvas
                if (this.CheckToolboxCollision(touchPoint) == false)
                {
                    this.CanvasTouchPoints.Add(this.ConvertScreenTouchToCanvasTouch(touchPoint));
                }
            }
        }