Air_Hockey_Simulator.AirHockeySimCtrl.SetupGraphics C# (CSharp) Method

SetupGraphics() public method

public SetupGraphics ( Graphics g, string detail ) : void
g System.Drawing.Graphics
detail string
return void
        public void SetupGraphics(Graphics g, string detail)
        {
            scale = (double)(this.Height - 2 * padding_top) / Table.Height;
            g.SmoothingMode = SmoothingMode.AntiAlias;
            g.TranslateTransform((this.Width / 2) - (int)((scale * Table.Width) / 2), this.Height - padding_top);
            g.DrawString(detail, this.Font, Brushes.Black, 0, 10);
            g.MultiplyTransform(flip_vertically);
        }