public void DrawString(string text, Vector2 position, System.Drawing.Color[] glyphColors) { if (_drawBackground) { var size = MeasureString(text); _spriteBatch.Draw(_white, new Rectangle((int)position.X, (int)position.Y, (int)size.X, (int)size.Y), Color.Green); } _font.DrawText(_renderer, text, position.ToSystemNumerics(), glyphColors); }
public static float DrawString(this SpriteBatch batch, DynamicSpriteFont font, StringBuilder text, Vector2 pos, Color[] colors, float depth = 0.0f) { return(font.DrawText(batch, text, pos, colors, depth)); }
public static float DrawString(this SpriteBatch batch, DynamicSpriteFont font, string text, Vector2 pos, Color color, Vector2 scale, float depth = 0.0f) { return(font.DrawText(batch, text, pos, color, scale, depth)); }