Пример #1
0
        public void DrawFillFigure(AFigure aFigure)
        {
            List <Point> points = aFigure.DoFigureMath();

            ConnectPoints(points, aFigure.SetColor(), aFigure.SetThickness());
            aFigure.FillFigure();
        }
Пример #2
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;
        }
Пример #3
0
 public override void DoLogicOnMouseClick(Point location, AFigure figure, Color color)
 {
     sBitmap.Copy();
     //sBitmap.DrawExceptIndexFigures(figure);
     //sBitmap.FillExceptIndexFigures(_currentFigure);
     figure._fillColor = color;
     figure.FillFigure(location);
     sBitmap.CopyFromFill();
 }