當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。