FSO.Client.UI.Framework.UIElement.DrawTiledTexture C# (CSharp) Method

DrawTiledTexture() public method

public DrawTiledTexture ( SpriteBatch batch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle dest, Color blend ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
texture Microsoft.Xna.Framework.Graphics.Texture2D
dest Microsoft.Xna.Framework.Rectangle
blend Color
return void
        public void DrawTiledTexture(SpriteBatch batch, Texture2D texture, Rectangle dest, Color blend)
        {
            //if (!m_IsInvalidated)
            //{
            var col = new Color(_BlendColor.ToVector4() * blend.ToVector4());
            for (int x = 0; x < dest.Width; x+=texture.Width)
            {
                for (int y= 0; y<dest.Height; y += texture.Height)
                {
                    batch.Draw(texture, FlooredLocalPoint(new Vector2(dest.X+x, dest.Y+y)), new Rectangle(0, 0, Math.Min(texture.Width, dest.Width-x), Math.Min(texture.Height, dest.Height - y)), col, 0.0f,
                        new Vector2(0.0f, 0.0f), _Scale, SpriteEffects.None, 0.0f);
                }
            }

            //}
        }