Alsing.Windows.Forms.SyntaxBox.Painter.NativePainter.RenderAll C# (CSharp) Method

RenderAll() public method

Implementation of the IPainter RenderAll method
public RenderAll ( Graphics g ) : void
g System.Drawing.Graphics Target Graphics object
return void
        public void RenderAll(Graphics g)
        {
            try
            {
                Control.InitVars();
                Control.InitScrollbars();
                SetBrackets();
                SetSpanIndicators();
                int j = Control.View.FirstVisibleRow;

                int diff = j - LastRow;
                LastRow = j;
                if (Control.SmoothScroll)
                {
                    if (diff == 1)
                    {
                        for (int i = Control.View.RowHeight; i > 0; i -= Control.SmoothScrollSpeed)
                        {
                            yOffset = i + Control.View.YOffset;
                            RenderAll2();
                            g.Flush();
                            Thread.Sleep(0);
                        }
                    }
                    else if (diff == -1)
                    {
                        for (int i = -Control.View.RowHeight; i < 0; i += Control.SmoothScrollSpeed)
                        {
                            yOffset = i + Control.View.YOffset;
                            RenderAll2();
                            g.Flush();
                            Thread.Sleep(0);
                        }
                    }
                }

                yOffset = Control.View.YOffset;
                RenderAll2();
                //g.Flush ();
                //System.Threading.Thread.Sleep (0);
            }
            catch {}
        }

Same methods

NativePainter::RenderAll ( ) : void