Revision 42283 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/primitive/curve/spline/AbstractSpline.java
AbstractSpline.java | ||
---|---|---|
145 | 145 |
} |
146 | 146 |
|
147 | 147 |
|
148 |
/* |
|
149 |
* (non-Javadoc) |
|
150 |
* |
|
151 |
* @see org.gvsig.fmap.geom.primitive.OrientablePrimitive#getVertex(int) |
|
152 |
*/ |
|
153 |
public Point getVertex(int index) { |
|
154 |
anyVertex.setJTSCoordinate(coordinates.get(index)); |
|
155 |
return anyVertex; |
|
156 |
} |
|
148 |
// /*
|
|
149 |
// * (non-Javadoc)
|
|
150 |
// *
|
|
151 |
// * @see org.gvsig.fmap.geom.primitive.OrientablePrimitive#getVertex(int)
|
|
152 |
// */
|
|
153 |
// public Point getVertex(int index) {
|
|
154 |
// anyVertex.setJTSCoordinate(coordinates.get(index));
|
|
155 |
// return anyVertex;
|
|
156 |
// }
|
|
157 | 157 |
|
158 | 158 |
/* |
159 | 159 |
* (non-Javadoc) |
... | ... | |
165 | 165 |
public void addVertex(Point point) { |
166 | 166 |
point = fixPoint(point); |
167 | 167 |
coordinates.add(((PointJTS) point).getJTSCoordinate()); |
168 |
anyVertex = (PointJTS) point; |
|
168 | 169 |
} |
169 | 170 |
|
170 | 171 |
/* |
... | ... | |
180 | 181 |
coordinates.clear(); |
181 | 182 |
addVertex(initialPoint); |
182 | 183 |
addVertex(endPoint); |
184 |
anyVertex = (PointJTS) endPoint; |
|
183 | 185 |
} |
184 | 186 |
|
185 | 187 |
/** |
... | ... | |
505 | 507 |
* @see java.awt.geom.PathIterator#next() |
506 | 508 |
*/ |
507 | 509 |
public void next() { |
508 |
done = (getJTS().getCoordinates().length == index++);
|
|
510 |
done = (getJTS().getCoordinates().length == ++index);
|
|
509 | 511 |
} |
510 | 512 |
|
511 | 513 |
/** |
... | ... | |
568 | 570 |
Collections.reverse(coordinates); |
569 | 571 |
} |
570 | 572 |
|
573 |
protected ArrayListCoordinateSequence cloneCoordinates() { |
|
574 |
ArrayListCoordinateSequence cloned = new ArrayListCoordinateSequence(); |
|
575 |
cloned.ensureCapacity(coordinates.size()); |
|
576 |
for (Iterator iterator = coordinates.iterator(); iterator.hasNext();) { |
|
577 |
Coordinate coordinate = (Coordinate) iterator.next(); |
|
578 |
cloned.add((Coordinate)coordinate.clone()); |
|
579 |
} |
|
580 |
return cloned; |
|
581 |
} |
|
582 |
|
|
571 | 583 |
} |
Also available in: Unified diff