using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace MonoGame.FourEngine.Resources
{
    /// <summary>
    /// Texture 1x1 filled with one color
    /// </summary>
    public class ColoredRectangle : Texture2D
    {
        /// <summary>
        /// Create new Texture instance
        /// </summary>
        /// <param name="color">Fill color</param>
        public ColoredRectangle(Color color)
            : base(FourEngineGame.Current.GraphicsDevice, 1, 1)
        {
            SetData(new[] { color });
        }
    }
}