Revision 2616 org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.smoothline/src/main/java/org/gvsig/vectorediting/lib/prov/smoothline/NatCubic.java

View differences:

NatCubic.java
72 72
            final Cubic[] X = calcNaturalCubic(m_X.length - 1, m_X);
73 73
            final Cubic[] Y = calcNaturalCubic(m_Y.length - 1, m_Y);
74 74

  
75
            Line line = geomManager.createLine(subtype);
75
            Line smoothedLine = geomManager.createLine(subtype);
76 76
            /*
77 77
             * very crude technique - just break each segment up into steps
78 78
             * lines
79 79
             */
80
            line.addVertex((int) Math.round(X[0].eval(0)),
80
            smoothedLine.addVertex((int) Math.round(X[0].eval(0)),
81 81
                (int) Math.round(Y[0].eval(0)));
82 82

  
83 83
            for (int i = 0; i < X.length; i++) {
84 84
                for (int j = 1; j <= iSteps; j++) {
85 85
                    final float u = j / (float) iSteps;
86
                    line.addVertex(X[i].eval(u), Y[i].eval(u));
86
                    smoothedLine.addVertex(X[i].eval(u), Y[i].eval(u));
87 87
                }
88 88
            }
89 89

  
90
            return line;
90
            return smoothedLine;
91 91

  
92 92
        } else {
93 93
            return this.line;

Also available in: Unified diff