Ejemplo 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);
        }
Ejemplo 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);
 }
Ejemplo 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();
 }
Ejemplo 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));
 }
Ejemplo 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;
		}
Ejemplo 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;
 }
Ejemplo 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;
 }
Ejemplo 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();
        }
Ejemplo 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 );
		}
Ejemplo n.º 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();
 }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
 }
Ejemplo 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);
        }
Ejemplo 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 );
		}
Ejemplo 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 );
		}
Ejemplo 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);
 }
Ejemplo n.º 18
0
Archivo: Debug.cs Proyecto: 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 ) );
		}