Exemple #1
0
        public static void DrawString(this SpriteBatch batch, FontTexture f, string str, Vector2 posistion, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effect, float depth)
        {
            var xoff = posistion.X;

            foreach (var c in str.ToCharArray())
            {
                batch.Draw(f.Font, new Vector2(xoff, (int)posistion.Y), f.Rects[c],
                           color, rotation, origin, scale, effect, depth);
                xoff += f.Rects[c].Width * scale;
            }
        }
Exemple #2
0
 public static void DrawString(this SpriteBatch batch, FontTexture f, string str, Vector2 posistion, Color color)
 {
     DrawString(batch, f, str, posistion, color, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
 }