using ComponentFramework;
using ComponentFramework.Modules;
using FullScreenShaders.Structure;

namespace FullScreenShaders.Services
{
    class SampleState : Service, ISampleState
    {
        public SampleState(ICore core) : base(core)
        {
            DownscaleFactor = 1;
            KaiserTaps = 8;
            GaussianTaps = 7;
            GaussianStandardDeviation = GaussianKernel.IdealStandardDeviation(7);
            InterpolationMode = InterpolationMode.Bilinear;
        }

        public int DownscaleFactor { get; set; }
        public bool Downscaling { get { return DownscaleFactor != 1; } }

        public bool GrayScale { get; set; }
        public bool HighPass { get; set; }
        public bool GaussianBlur { get; set; }
        public bool Vignette { get; set; }

        public bool FastGaussian { get; set; }
        public int GaussianTaps { get; set; }
        public double GaussianStandardDeviation { get; set; }

        public InterpolationMode InterpolationMode { get; set; }
        public DownsamplingMode DownsamplingMode { get; set; }
        public int KaiserTaps { get; set; }

        public bool MouseInViewport { get; set; }
        public bool Rotation { get; set; }
    }

    interface ISampleState : IService
    {
        int DownscaleFactor { get; set; }
        bool Downscaling { get; }

        bool GrayScale { get; set; }
        bool HighPass { get; set; }
        bool GaussianBlur { get; set; }
        bool Vignette { get; set; }

        bool FastGaussian { get; set; }
        int GaussianTaps { get; set; }
        double GaussianStandardDeviation { get; set; }

        InterpolationMode InterpolationMode { get; set; }
        DownsamplingMode DownsamplingMode { get; set; }
        int KaiserTaps { get; set; }

        bool MouseInViewport { get; set; }
        bool Rotation { get; set; }
    }
}
