예제 #1
0
        protected bool CheckCurrentIteration(out ComponentStepInstance nextStep)
        {
            // Check iterations.

            if (_currentIteration >= _iterations)
            {
                _currentIteration = 0;
                nextStep          = ParentStep == null ? null : ParentStep.GetNextStep();
                return(true);
            }

            nextStep = null;
            return(false);
        }
        protected int GetFlippedY(int y, double flipYAxis)
        {
            if ((FlipY == FlipSetting.Inherit && ParentStep == null) || (FlipY == FlipSetting.No))
            {
                return(y);
            }

            if (FlipY == FlipSetting.Yes)
            {
                int newY = (int)(2 * flipYAxis - y);
                return(newY);
            }

            // Must be inherited:
            return(ParentStep.GetFlippedY(y, flipYAxis));
        }
        protected int GetFlippedX(int x, double flipXAxis, bool shouldNormalize = true)
        {
            if ((FlipX == FlipSetting.Inherit && ParentStep == null) || (FlipX == FlipSetting.No))
            {
                return(x);
            }

            if (FlipX == FlipSetting.Yes)
            {
                int newX = (int)(2 * flipXAxis - x);
                if (shouldNormalize)
                {
                    newX = GetNormalizedX(newX);
                }
                return(newX);
            }

            // Must be inherited:
            return(ParentStep.GetFlippedX(x, flipXAxis));
        }