Esempio n. 1
0
        private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            mouseDown = false;
            fill      = false;
            if (mode == "Изменить")
            {
                mode = "Рисуем";
                bitmap.AddFigure(ActiveFigure);
                bitmap.DeleteFigure(Current);
                ActiveFigure = null;
                q            = false;
            }

            if (mode == "Заливка")
            {
                ActiveFigure.FindPoint();
                ActiveFigure.FillFigure();
                mode = "Рисуем";
            }

            if (CurrentFigure != null && _deletingFigure == false)
            {
                if (_fillColor != Color.Transparent)
                {
                    CurrentFigure.FindPoint();
                    CurrentFigure.FillFigure();
                }
                bitmap.AddFigure(CurrentFigure);
            }

            bitmap.CopyInOld();
            pictureBox.Image = bitmap.Bitmap;
        }