private void FinalizePolygon() { Debug.WriteLine("Starting filling polygon..."); Point first = _points[0]; Point last = _points.Last(); //_graphics.DrawLine(_pen, first, last); DrawLine(_pen.Color, first.X, first.Y, last.X, last.Y); _isFinalized = true; PolygonFiller filler = new PolygonFiller(OnPointFilled); List <Edge> edges = GetEdges(); _bitmap = new Bitmap(pictureBox1.Width, pictureBox1.Height); filler.FillPolygon(edges); Debug.WriteLine("Filling finished!"); pictureBox1.Image = _bitmap; }
private void FillPolygon(List <Edge> edges) { PolygonFiller filler = new PolygonFiller(OnCellFilled); filler.FillPolygon(edges); }