FSO.IDE.FSOUIControl.PaintUsingSystemDrawing C# (CSharp) Method

PaintUsingSystemDrawing() protected method

protected PaintUsingSystemDrawing ( Graphics graphics, string text ) : void
graphics System.Drawing.Graphics
text string
return void
        protected virtual void PaintUsingSystemDrawing(Graphics graphics, string text)
        {
            graphics.Clear(System.Drawing.Color.FromArgb(0xD1, 0xD1, 0xC3));

            using (Brush brush = new SolidBrush(System.Drawing.Color.DarkSlateGray))
            {
                using (StringFormat format = new StringFormat())
                {
                    format.Alignment = StringAlignment.Center;
                    format.LineAlignment = StringAlignment.Center;

                    graphics.DrawString(text, Font, brush, ClientRectangle, format);
                }
            }
        }