Пример #1
0
        public WarpIterator(RectangleD[] points, Warp warp, Size clipSize, Size newSize, int iteration, int warpSteps)
        {
            warpPoints     = points;
            SizeCoef       = new SizeD((double)newSize.Width / clipSize.Width, (double)newSize.Height / clipSize.Height);
            super          = warp.Scale(SizeCoef);
            size           = newSize;
            this.iteration = iteration;
            this.warpSteps = warpSteps;

            history = new HashSet <Warp>
            {
                super
            };

            if (super.IsEmpty && iteration > 0)
            {
                super = new Warp(warpPoints.Length);
                for (var j = 0; j < warpPoints.Length; j++)
                {
                    var jPoint = warpPoints[j].Scale(SizeCoef);
                    super[j] = new RectangleD(jPoint.X, jPoint.Y, 0, 0);
                }
            }
        }
Пример #2
0
 public RectangleD Scale(SizeD coefs)
 {
     return(Scale(coefs.Width, coefs.Height));
 }
Пример #3
0
 public Warp Scale(SizeD coefs)
 {
     return(Scale(coefs.Width, coefs.Height));
 }