GHud.DisplayModule.RenderString C# (CSharp) Method

RenderString() protected method

protected RenderString ( String str, int line, int column, int &c_offsets, StringFormat fmt, System style = System.Drawing.FontStyle.Regular, bool back_rect = false, float cur_font_pt = 0.0f, float xoffset = 0.0f, float yoffset = 0.0f ) : void
str String
line int
column int
c_offsets int
fmt System.Drawing.StringFormat
style System
back_rect bool
cur_font_pt float
xoffset float
yoffset float
return void
        protected void RenderString(String str, int line, int column, ref int[] c_offsets, StringFormat fmt, System.Drawing.FontStyle style = System.Drawing.FontStyle.Regular, bool back_rect = false, float cur_font_pt = 0.0f, float xoffset = 0.0f, float yoffset = 0.0f)
        {
            if (!active)
                return;

            System.Drawing.Font cfont = new System.Drawing.Font(dev.font_names[dev.cur_font], cur_font_pt == 0 ? font_pt : cur_font_pt, style);
            CalcColumns(cfont);

            xoffset += xoff;
            yoffset += yoff;
            Rectangle rect1 = new Rectangle((int)(c_offsets[column] + xoffset),
                                                  (int)(Math.Floor(line_offset * line) + yoffset),
                                                  (int)(c_offsets[column + 1] - c_offsets[column]), //+xoffset
                                                  (int)(Math.Ceiling(line_offset)));// +yoffset

            if (back_rect)
            {
                FillRectGradient(rect1, 0.5f, back_rect_c1, back_rect_c2, 0.5f, back_rect_c2, back_rect_c1);
                dev.graph.DrawString(str, cfont, dev.inverted_txt_brush, rect1, fmt);
            }
            else
            {
                dev.graph.DrawString(str, cfont, dev.default_txt_brush, rect1, fmt);
            }

            cfont.Dispose();
        }