示例#1
0
        public static Interpolator Create(AlgorithmType algorithm, float[] floatValues, int intValue)
        {
            Interpolator.Verify(algorithm, floatValues, intValue);

            var interpolator = new Interpolator();

            interpolator.algorithm   = algorithm;
            interpolator.floatValues = floatValues;
            interpolator.intValue    = intValue;
            interpolator.Apply();
            return(interpolator);
        }
示例#2
0
        public void Change(AlgorithmType algorithm, float[] floatValues, int intValue)
        {
            Interpolator.Verify(algorithm, floatValues, intValue);

            if (this.algorithm != algorithm)
            {
                this.Invalidate();
                this.algorithm = algorithm;
            }
            else
            {
                this.isDirty = true;
            }

            this.floatValues = floatValues;
            this.intValue    = intValue;
            this.Apply();
        }