Exemplo n.º 1
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);
 }
Exemplo n.º 2
0
 public DebugDrawItem(NezSpriteFont spriteFont, String text, Vector2 position, Color color, float duration,
                      float scale)
 {
     SpriteFont = spriteFont;
     Text       = text;
     Position   = position;
     Color      = color;
     Scale      = scale;
     Duration   = duration;
     drawType   = DebugDrawType.SpriteFontText;
 }
Exemplo n.º 3
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)
        {
            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);
        }
Exemplo n.º 4
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);
 }