using System.Drawing;

namespace ZionGraphics.Filtering
{
    class Rotate : IFilter
    {
        public override Bitmap Apply(Bitmap bitmap)
        {
            switch (this.Intensity)
            {
                case 90:
                    bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone);
                    break;
                case 180:
                    bitmap.RotateFlip(RotateFlipType.Rotate180FlipNone);
                    break;
                case 270:
                    bitmap.RotateFlip(RotateFlipType.Rotate270FlipNone);
                    break;
                case 360:
                    bitmap.RotateFlip(RotateFlipType.RotateNoneFlipNone);
                    break;
                default:
                    bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone);
                    break;
            }

            return bitmap;
        }
    }
}
