public void Draw(Graphics g) { var brush = new SolidBrush(Color.FromArgb(255, 255, 255)); g.FillRectangle(brush, ClientRectangle); var pen = new Pen(Color.FromArgb(0, 0, 255), 1); g.DrawRectangle(pen, 0, 0, SizePicture.Width, SizePicture.Height); if (_graphicsList != null) { _graphicsList.Draw(g); } brush.Dispose(); }
/// <summary> /// Draw graphic objects and /// group selection rectangle (optionally) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DrawArea_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { SolidBrush brush = new SolidBrush(Color.FromArgb(255, 255, 255)); e.Graphics.FillRectangle(brush, this.ClientRectangle); if (graphicsList != null) { graphicsList.Draw(e.Graphics); } DrawNetSelection(e.Graphics); brush.Dispose(); }
/// <summary> /// Draw graphic objects and /// group selection rectangle (optionally) /// </summary> private void DrawArea_Paint(object sender, PaintEventArgs e) { e.Graphics.TranslateTransform((float)this.AutoScrollPosition.X, (float)this.AutoScrollPosition.Y); SolidBrush brush = new SolidBrush(Color.FromArgb(255, 255, 255)); e.Graphics.FillRectangle(brush, this.ClientRectangle); if (graphicsList != null) { graphicsList.Draw(e.Graphics); } //DrawNetSelection(e.Graphics); brush.Dispose(); e.Graphics.TranslateTransform(-(float)this.AutoScrollPosition.X, -(float)this.AutoScrollPosition.Y); }
internal void Draw(Graphics g) { _graphicsList.Draw(g); }