Example #1
0
        private void pictureBox_MouseUp(object sender, MouseEventArgs e)
        {
            _currentPoint = e.Location;
            mousePress    = false;
            if (_factory != null)
            {
                sBitmap.SaveFigures(_currentFigure);
                sBitmap.Update();

                if (_fillColor != Color.Transparent)
                {
                    sBitmap.Copy();
                    _currentFigure.FillFigure(_currentFigure._centerPoint);
                    sBitmap.CopyFromFill();
                }
            }
            else
            {
                if (_clickFigure != null)
                {
                    tool.DoLogicOnMouseUp(_currentFigure);
                }
            }

            sBitmap.Update();
            pictureBox1.Image = sBitmap._bitmap;
        }
 public void FillFigure(AFigure figure)
 {
     figure.FillFigure(figure._centerPoint);
 }