Esempio n. 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);
        }
Esempio n. 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);
 }
Esempio n. 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();
 }
Esempio n. 4
0
 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));
 }
Esempio n. 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;
		}
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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();
        }
Esempio n. 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 );
		}
 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();
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
 }
Esempio n. 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);
        }
Esempio n. 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 );
		}
Esempio n. 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 );
		}
Esempio n. 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);
 }
Esempio n. 18
0
File: Debug.cs Progetto: 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 ) );
		}