示例#1
0
        public Image Apply(Image sourceImage, out Point offsetChange)
        {
            offsetChange = Point.Empty;

            RotateFlipType flipType = EffectType == FlipEffectType.HorizontalFlip
                ? RotateFlipType.RotateNoneFlipX : RotateFlipType.RotateNoneFlipY;

            return(ImageOperator.RotateFlip(sourceImage, flipType));
        }
示例#2
0
        public Image Apply(Image sourceImage, out Point offsetChange)
        {
            offsetChange = Point.Empty;
            RotateFlipType flipType;

            if (Angle == 90)
            {
                flipType = RotateFlipType.Rotate90FlipNone;
            }
            else if (Angle == -90 || Angle == 270)
            {
                flipType = RotateFlipType.Rotate270FlipNone;
            }
            else
            {
                throw new NotSupportedException("Currently only an angle of 90 or -90 (270) is supported.");
            }
            return(ImageOperator.RotateFlip(sourceImage, flipType));
        }