本文整理汇总了C#中Microsoft.Xna.Framework.Graphics.SpriteFont.DrawInto方法的典型用法代码示例。如果您正苦于以下问题:C# SpriteFont.DrawInto方法的具体用法?C# SpriteFont.DrawInto怎么用?C# SpriteFont.DrawInto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Xna.Framework.Graphics.SpriteFont
的用法示例。
在下文中一共展示了SpriteFont.DrawInto方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawString
public void DrawString (
SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color,
float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth)
{
if (spriteFont == null)
throw new ArgumentNullException ("spriteFont");
spriteFont.DrawInto (this, text, position, color, rotation, origin, scale, effect, depth);
}
示例2: DrawString
public void DrawString(SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effect, float depth)
{
this.CheckValid(spriteFont, text);
SpriteFont.CharacterSource text1 = new SpriteFont.CharacterSource(text);
spriteFont.DrawInto(this, ref text1, position, color, rotation, origin, scale, effect, depth);
}
示例3: DrawString
public void DrawString (
SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color,
float rotation, Vector2 origin, float scale, SpriteEffects effects, float depth)
{
CheckValid(spriteFont, text);
var scaleVec = new Vector2 (scale, scale);
var source = new SpriteFont.CharacterSource(text);
spriteFont.DrawInto(this, ref source, position, color, rotation, origin, scaleVec, effects, depth);
}
示例4: DrawString
/// <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, string 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);
}