Paint.Canvas.DrawPicture C# (CSharp) Méthode

DrawPicture() private méthode

Updates our picture with any new points on screen that the user has touched The list of all gestures / locations that we need to paint
private DrawPicture ( List touchPoints ) : void
touchPoints List
Résultat void
        private void DrawPicture(List<ITouchPointSizeColor> touchPoints)
        {
            foreach (var touch in touchPoints)
            {
                Vector2 position = touch.Position;

                int brushOffset = touch.Size.Width / 2;

                Rectangle rectangle = new Rectangle(
                    (int)position.X - brushOffset,
                    (int)position.Y - brushOffset,
                    touch.Size.Width,
                    touch.Size.Height);

                this.graphicsDisplay.DrawGraphic(ImageType.EmptySquare, rectangle, touch.Color);
            }
        }