Package org.apache.flex.forks.batik.ext.awt.geom

Examples of org.apache.flex.forks.batik.ext.awt.geom.Cubic


                            / (keyTimes[keyTimeIndex + 1] - keyTimes[keyTimeIndex]);
                    }
                    if (calcMode == CALC_MODE_SPLINE && unitTime != 0) {
                        // XXX This could be done better, e.g. with
                        //     Newton-Raphson.
                        Cubic c = keySplineCubics[keyTimeIndex];
                        float tolerance = 0.001f;
                        float min = 0;
                        float max = 1;
                        Point2D.Double p;
                        for (;;) {
                            float t = (min + max) / 2;
                            p = c.eval(t);
                            double x = p.getX();
                            if (Math.abs(x - interpolation) < tolerance) {
                                break;
                            }
                            if (x < interpolation) {
View Full Code Here


                     new Object[] { null,
                                    SMILConstants.SMIL_KEY_SPLINES_ATTRIBUTE });
            }
            keySplineCubics = new Cubic[keySplines.length / 4];
            for (int i = 0; i < keySplines.length / 4; i++) {
                keySplineCubics[i] = new Cubic(0, 0,
                                               keySplines[i * 4],
                                               keySplines[i * 4 + 1],
                                               keySplines[i * 4 + 2],
                                               keySplines[i * 4 + 3],
                                               1, 1);
View Full Code Here

                interpolation = (unitTime - keyTimes[keyTimeIndex])
                    / (keyTimes[keyTimeIndex + 1] - keyTimes[keyTimeIndex]);
                if (calcMode == CALC_MODE_SPLINE && unitTime != 0) {
                    // XXX This could be done better, e.g. with
                    //     Newton-Raphson.
                    Cubic c = keySplineCubics[keyTimeIndex];
                    float tolerance = 0.001f;
                    float min = 0;
                    float max = 1;
                    Point2D.Double p;
                    for (;;) {
                        float t = (min + max) / 2;
                        p = c.eval(t);
                        double x = p.getX();
                        if (Math.abs(x - interpolation) < tolerance) {
                            break;
                        }
                        if (x < interpolation) {
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.batik.ext.awt.geom.Cubic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.