AGENT.Contrib.Drawing.Drawing.DrawTextCentered C# (CSharp) Method

DrawTextCentered() public method

Draw text right in the center of the screen
public DrawTextCentered ( Microsoft.SPOT.Bitmap screen, string text, Microsoft.SPOT.Font font, System.Color color ) : void
screen Microsoft.SPOT.Bitmap
text string
font Microsoft.SPOT.Font
color System.Color
return void
        public void DrawTextCentered(Bitmap screen, string text, Font font, Color color)
        {
            var center = FindCenter(text, font);
            screen.DrawText(text, font, color, center.X, center.Y);
        }