/// <summary> /// Submit a text string of sprites for drawing in the current batch. /// </summary> /// <param name="spriteFont">A font.</param> /// <param name="text">The text which will be drawn.</param> /// <param name="position">The drawing location on screen.</param> /// <param name="color">A color mask.</param> /// <param name="rotation">A rotation of this string.</param> /// <param name="origin">Center of the rotation. 0,0 by default.</param> /// <param name="scale">A scaling of this string.</param> /// <param name="effects">Modificators for drawing. Can be combined.</param> /// <param name="layerDepth">A depth of the layer of this string.</param> public void DrawString( SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth) { CheckValid(spriteFont, text); var source = new SpriteFont.CharacterSource(text); spriteFont.DrawInto(this, ref source, position, color, rotation, origin, scale, effects, layerDepth); }