NPlot.Windows.PlotSurface2D.DoPaint C# (CSharp) Method

DoPaint() public method

All functionality of the OnPaint method is provided by this function. This allows use of the all encompasing PlotSurface.
public DoPaint ( PaintEventArgs pe, int width, int height ) : void
pe PaintEventArgs the PaintEventArgs from paint event.
width int width of the control
height int height of the control
return void
        public void DoPaint(PaintEventArgs pe, int width, int height)
        {
            this.PreRefresh(this);

            foreach (Interactions.Interaction i in interactions_)
            {
                i.DoPaint(pe, width, height);
            }

            /*
            // make sure don't redraw after a refresh.
            this.horizontalBarPos_ = -1;
            this.verticalBarPos_ = -1;
            */

            Graphics g = pe.Graphics;

            Rectangle border = new Rectangle(0, 0, width, height);

            if (g == null)
            {
                throw (new NPlotException("null graphics context!"));
            }

            if (ps_ == null)
            {
                throw (new NPlotException("null NPlot.PlotSurface2D"));
            }

            if (border == Rectangle.Empty)
            {
                throw (new NPlotException("null border context"));
            }

            this.Draw(g, border);
        }