当前位置: 首页>>代码示例>>C#>>正文


C# SpriteFont.DrawInto方法代码示例

本文整理汇总了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);
		}
开发者ID:adison,项目名称:Tank-Wars,代码行数:9,代码来源:SpriteBatch.cs

示例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);
 }
开发者ID:Zeludon,项目名称:FEZ,代码行数:6,代码来源:SpriteBatch.cs

示例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);
		}
开发者ID:bwfox,项目名称:MonoGame,代码行数:10,代码来源:SpriteBatch.cs

示例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);
		}
开发者ID:KennethYap,项目名称:MonoGame,代码行数:21,代码来源:SpriteBatch.cs


注:本文中的Microsoft.Xna.Framework.Graphics.SpriteFont.DrawInto方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。