Пример #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
 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
		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 ) );
		}