Пример #1
0
        private void graphCanvas_Paint(object sender, PaintEventArgs e)
        {
            // draw graph
            _drawer.InitCanvas(graphCanvas.Size, e.Graphics);
            _forestGraph.DrawWithPath(_drawer, _graphPath);

            // draw rectangle
            if (!_rectangle.Location.IsEmpty && !_rectangle.Size.IsEmpty && _rectangleDrawing)
            {
                RectangleF rectangle = new RectangleF(_rectangle.Location, _rectangle.Size);
                _drawer.DrawRectangle(rectangle);
            }
        }