Пример #1
0
        private void ProcessDrawingInput(MouseEventArgs e)
        {
            Point     cursorPosition = e.GetPosition(PageContainer);
            VectorInt pixelPosition  = GetPixelPosition(cursorPosition);

            if (e.LeftButton == MouseButtonState.Pressed)
            {
                Draw(pixelPosition.x, pixelPosition.y, brush.Color);
            }

            if (e.RightButton == MouseButtonState.Pressed)
            {
                Draw(pixelPosition.x, pixelPosition.y, Colors.Transparent);
            }
        }