Beispiel #1
0
        public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color)
        {
            if (spriteFont == null)
            {
                throw new ArgumentNullException("spriteFont");
            }
            if (text == null)
            {
                throw new ArgumentNullException("text");
            }
            Vector2 one = Vector2.One;

            spriteFont.Draw(ref text, this, position, color, 0f, Vector2.Zero, ref one, SpriteEffects.None, 0f);
        }
Beispiel #2
0
        public void DrawString(SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
        {
            Vector2 vector;

            if (spriteFont == null)
            {
                throw new ArgumentNullException("spriteFont");
            }
            if (text == null)
            {
                throw new ArgumentNullException("text");
            }
            vector.X = scale;
            vector.Y = scale;
            spriteFont.Draw(ref text, this, position, color, rotation, origin, ref vector, effects, layerDepth);
        }