예제 #1
0
        public static void drawString(this Batcher batcher, NezSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color,
                                      float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
        {
            Assert.isFalse(text == null);

            batcher.drawString(spriteFont, text, position, color, rotation, origin, new Vector2(scale), effects, layerDepth);
        }
예제 #2
0
 public static void DrawString(this Batcher batcher, NezSpriteFont spriteFont, string text, Vector2 position,
                               Color color, float rotation,
                               Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
 {
     batcher.DrawString(spriteFont, text, position, color, rotation, origin, new Vector2(scale), effects,
                        layerDepth);
 }
예제 #3
0
 public FramesPerSecondCounter( NezSpriteFont font, Color color, FPSDockPosition dockPosition = FPSDockPosition.TopRight, int maximumSamples = 100 )
     : base(font, string.Empty, Vector2.Zero, color)
 {
     this.maximumSamples = maximumSamples;
     this.dockPosition = dockPosition;
     initialize();
 }
예제 #4
0
파일: Debug.cs 프로젝트: Taikatou/Nez
 public static void drawText(NezSpriteFont font, string text, Vector2 position, Color color, float duration = 0f, float scale = 1f)
 {
     if (!Core.debugRenderEnabled)
     {
         return;
     }
     _debugDrawItems.Add(new DebugDrawItem(font, text, position, color, duration, scale));
 }
예제 #5
0
		public DebugDrawItem( NezSpriteFont spriteFont, String text, Vector2 position, Color color, float duration, float scale )
		{
			this.spriteFont = spriteFont;
			this.text = text;
			this.position = position;
			this.color = color;
			this.scale = scale;
			this.duration = duration;
			drawType = DebugDrawType.SpriteFontText;
		}
예제 #6
0
 public DebugDrawItem(NezSpriteFont spriteFont, String text, Vector2 position, Color color, float duration, float scale)
 {
     this.SpriteFont = spriteFont;
     this.Text       = text;
     this.Position   = position;
     this.Color      = color;
     this.Scale      = scale;
     this.Duration   = duration;
     drawType        = DebugDrawType.SpriteFontText;
 }
예제 #7
0
 public DebugDrawItem(NezSpriteFont spriteFont, String text, System.Numerics.Vector2 position, Color color, float duration,
                      float scale)
 {
     SpriteFont = spriteFont;
     Text       = text;
     Position   = position;
     Color      = color;
     Scale      = scale;
     Duration   = duration;
     drawType   = DebugDrawType.SpriteFontText;
 }
예제 #8
0
        public Text(NezSpriteFont font, string text, Vector2 position, Color color)
        {
            _spriteFont      = font;
            _text            = text;
            _localOffset     = position;
            this.color       = color;
            _horizontalAlign = HorizontalAlign.Left;
            _verticalAlign   = VerticalAlign.Top;

            updateSize();
        }
예제 #9
0
		public static void drawString( this Batcher batcher, NezSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation,
			Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth )
		{
			Assert.isFalse( text == null );

			if( text.Length == 0 )
				return;

			var source = new FontCharacterSource( text );
			spriteFont.drawInto( batcher, ref source, position, color, rotation, origin, scale, effects, layerDepth );
		}
예제 #10
0
 public FramesPerSecondCounter(
     NezSpriteFont font,
     Color color,
     FPSDockPosition dockPosition = FPSDockPosition.TopRight,
     int maximumSamples           = 100)
     : base(font, string.Empty, Vector2.Zero, color)
 {
     this.maximumSamples = maximumSamples;
     this.dockPosition   = dockPosition;
     init();
 }
예제 #11
0
        public static void drawString(this Batcher batcher, NezSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation,
                                      Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
        {
            Assert.isFalse(text == null);

            if (text.Length == 0)
            {
                return;
            }

            var source = new FontCharacterSource(text);

            spriteFont.drawInto(batcher, ref source, position, color, rotation, origin, scale, effects, layerDepth);
        }
예제 #12
0
        public static void DrawString(this Batcher batcher, NezSpriteFont spriteFont, StringBuilder text,
                                      System.Numerics.Vector2 position, Color color,
                                      float rotation, System.Numerics.Vector2 origin, System.Numerics.Vector2 scale, SpriteEffects effects,
                                      float layerDepth)
        {
            Insist.IsFalse(text == null);

            if (text.Length == 0)
            {
                return;
            }

            var source = new FontCharacterSource(text);

            spriteFont.DrawInto(batcher, ref source, position, color, rotation, origin, scale, effects, layerDepth);
        }
예제 #13
0
 public static void drawString(
     this Batcher batcher,
     NezSpriteFont spriteFont,
     string text,
     Vector2 position,
     Color color)
 {
     batcher.drawString(
         spriteFont,
         text,
         position,
         color,
         0.0f,
         Vector2.Zero,
         new Vector2(1.0f),
         SpriteEffects.None,
         0.0f);
 }
예제 #14
0
        public static void drawString(this Batcher batcher, NezSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color)
        {
            Assert.isFalse(text == null);

            batcher.drawString(spriteFont, text, position, color, 0.0f, Vector2.Zero, new Vector2(1.0f), SpriteEffects.None, 0.0f);
        }
예제 #15
0
		public static void drawString( this Batcher batcher, NezSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation,
			Vector2 origin, float scale, SpriteEffects effects, float layerDepth )
		{
			batcher.drawString( spriteFont, text, position, color, rotation, origin, new Vector2( scale ), effects, layerDepth );
		}
예제 #16
0
		public static void drawString( this Batcher batcher, NezSpriteFont spriteFont, string text, Vector2 position, Color color )
		{
			batcher.drawString( spriteFont, text, position, color, 0.0f, Vector2.Zero, new Vector2( 1.0f ), SpriteEffects.None, 0.0f );
		}
예제 #17
0
 public static void DrawString(this Batcher batcher, NezSpriteFont spriteFont, string text, System.Numerics.Vector2 position,
                               Color color)
 {
     batcher.DrawString(spriteFont, text, position, color, 0.0f, System.Numerics.Vector2.Zero, new System.Numerics.Vector2(1.0f),
                        SpriteEffects.None, 0.0f);
 }
예제 #18
0
파일: Debug.cs 프로젝트: prime31/Nez
		public static void drawText( NezSpriteFont font, string text, Vector2 position, Color color, float duration = 0f, float scale = 1f )
		{
			if( !Core.debugRenderEnabled )
				return;
			_debugDrawItems.Add( new DebugDrawItem( font, text, position, color, duration, scale ) );
		}