public void DrawFillFigure(AFigure aFigure) { List <Point> points = aFigure.DoFigureMath(); ConnectPoints(points, aFigure.SetColor(), aFigure.SetThickness()); aFigure.FillFigure(); }
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; }
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(); }