Revision 29973
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/cad/tools/ComplexSelectionCADTool.java | ||
---|---|---|
325 | 325 |
Geometry circle = createCircle(firstPoint, |
326 | 326 |
new Point2D.Double(x, y)); |
327 | 327 |
GeneralPathX gpx = new GeneralPathX(); |
328 |
gpx.append(circle.getInternalShape(), true); |
|
328 |
gpx.append(circle.getInternalShape().getPathIterator(null), true);
|
|
329 | 329 |
Geometry circleSel = createCurve(gpx); |
330 | 330 |
// Dibuja el c?rculo de selecci?n |
331 | 331 |
DrawOperationContext doc = new DrawOperationContext(); |
... | ... | |
444 | 444 |
"ComplexSelectionCADTool.end"))) { |
445 | 445 |
Geometry polygon = getGeometryPolygon(null); |
446 | 446 |
GeneralPathX gpx = new GeneralPathX(); |
447 |
gpx.append(polygon, true); |
|
447 |
gpx.append(polygon.getPathIterator(null), true);
|
|
448 | 448 |
if (gpx.isCCW()) { |
449 | 449 |
gpx.flip(); |
450 | 450 |
polygon = createSurface(gpx); |
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/cad/tools/BreakCADTool.java | ||
---|---|---|
439 | 439 |
theIterator.next(); |
440 | 440 |
} // end while loop |
441 | 441 |
GeneralPathX gpx = new GeneralPathX(); |
442 |
gpx.append(geomAux.getInternalShape(), true); |
|
442 |
gpx.append(geomAux.getInternalShape().getPathIterator(null), true);
|
|
443 | 443 |
VectorialLayerEdited vle = getVLE(); |
444 | 444 |
FeatureStore featureStore = ((FLyrVect) vle.getLayer()) |
445 | 445 |
.getFeatureStore(); |
branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/cad/tools/InternalPolygonCADTool.java | ||
---|---|---|
360 | 360 |
if (!gpxInternal.isCCW()) { |
361 | 361 |
gpxInternal.flip(); |
362 | 362 |
} |
363 |
newGp.append(gpxInternal,false); |
|
363 |
newGp.append(gpxInternal.getPathIterator(null),false);
|
|
364 | 364 |
|
365 | 365 |
return createSurface(newGp); |
366 | 366 |
} |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/layout/geometryadapters/CircleAdapter.java | ||
---|---|---|
81 | 81 |
public Geometry getGeometry(AffineTransform at) { |
82 | 82 |
GeneralPathX polyLine; |
83 | 83 |
try { |
84 |
polyLine = new GeneralPathX(geomManager.createSurface(getGPX(), SUBTYPES.GEOM2D)); |
|
84 |
polyLine = new GeneralPathX(geomManager.createSurface(getGPX(), SUBTYPES.GEOM2D).getPathIterator(null));
|
|
85 | 85 |
polyLine.transform(at); |
86 | 86 |
return geomManager.createSurface(polyLine, SUBTYPES.GEOM2D); |
87 | 87 |
} catch (CreateGeometryException e) { |
... | ... | |
147 | 147 |
double r = p.distance(points[0]); |
148 | 148 |
Ellipse2D ellipse = new Ellipse2D.Double(x - r, y - r, 2. * r, 2. * r); |
149 | 149 |
|
150 |
setGPX(new GeneralPathX(ellipse)); |
|
150 |
setGPX(new GeneralPathX(ellipse.getPathIterator(null)));
|
|
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
public void print(Graphics2D g, AffineTransform at, ISymbol symbol, |
branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/layout/geometryadapters/PolygonAdapter.java | ||
---|---|---|
119 | 119 |
* @param symbol DOCUMENT ME! |
120 | 120 |
*/ |
121 | 121 |
public void draw(Graphics2D g, AffineTransform at, ISymbol symbol) { |
122 |
GeneralPathX rectangle = new GeneralPathX(getGeometry()); |
|
122 |
GeneralPathX rectangle = new GeneralPathX(getGeometry().getPathIterator(null));
|
|
123 | 123 |
rectangle.transform(at); |
124 | 124 |
|
125 | 125 |
Geometry shapeAux; |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/rendering/TestAbstractIntervalLegend.java | ||
---|---|---|
704 | 704 |
d.height); |
705 | 705 |
GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
706 | 706 |
Curve curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D); |
707 |
curve.setGeneralPath(new GeneralPathX(aShape)); |
|
707 |
curve.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null)));
|
|
708 | 708 |
|
709 | 709 |
/* |
710 | 710 |
* create a full-featured Feature with randomed values at its fields |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/rendering/TestIClassifiedLegend.java | ||
---|---|---|
704 | 704 |
d.height); |
705 | 705 |
GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
706 | 706 |
Curve curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D); |
707 |
curve.setGeneralPath(new GeneralPathX(aShape)); |
|
707 |
curve.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null)));
|
|
708 | 708 |
|
709 | 709 |
/* |
710 | 710 |
* create a full-featured Feature with randomed values at its fields |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/legend/styling/TextPath.java | ||
---|---|---|
269 | 269 |
} |
270 | 270 |
correctedPath.lineTo(endPointX, endPointY); |
271 | 271 |
|
272 |
return geomManager.createCurve(new GeneralPathX( |
|
273 |
correctedPath), SUBTYPES.GEOM2D); |
|
272 |
return geomManager.createCurve(new GeneralPathX(correctedPath.getPathIterator(null)), SUBTYPES.GEOM2D); |
|
274 | 273 |
} |
275 | 274 |
|
276 | 275 |
/** |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/legend/styling/LabelClass.java | ||
---|---|---|
440 | 440 |
|
441 | 441 |
AffineTransform at = AffineTransform.getTranslateInstance(p.getX(), p.getY()); |
442 | 442 |
at.concatenate(AffineTransform.getRotateInstance(theta)); |
443 |
returnedValue = geomManager.createSurface(new GeneralPathX(bounds), SUBTYPES.GEOM2D); |
|
443 |
returnedValue = geomManager.createSurface(new GeneralPathX(bounds.getPathIterator(null)), SUBTYPES.GEOM2D);
|
|
444 | 444 |
|
445 | 445 |
returnedValue.transform(at); |
446 | 446 |
return returnedValue; |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/FGraphicUtilities.java | ||
---|---|---|
167 | 167 |
|
168 | 168 |
case Geometry.TYPES.SURFACE: |
169 | 169 |
|
170 |
GeneralPathX rectAux = new GeneralPathX(r); |
|
170 |
GeneralPathX rectAux = new GeneralPathX(r.getPathIterator(null));
|
|
171 | 171 |
rectAux.transform(mT2); |
172 | 172 |
geom = geomManager.createSurface(rectAux, SUBTYPES.GEOM2D); |
173 | 173 |
|
... | ... | |
182 | 182 |
// Pol�gono |
183 | 183 |
r.setSize(r.width / 3, r.height); |
184 | 184 |
|
185 |
GeneralPathX rectAux2 = new GeneralPathX(r); |
|
185 |
GeneralPathX rectAux2 = new GeneralPathX(r.getPathIterator(null));
|
|
186 | 186 |
rectAux2.transform(mT2); |
187 | 187 |
geom = geomManager.createSurface(rectAux2, SUBTYPES.GEOM2D); |
188 | 188 |
symbol.draw(g2, mT, geom, null); |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/SimpleTextSymbol.java | ||
---|---|---|
280 | 280 |
Shape shape = gv.getOutline((float) p.getX(), (float) p.getY()); |
281 | 281 |
Geometry myFShape; |
282 | 282 |
try { |
283 |
myFShape = geomManager.createSurface(new GeneralPathX(shape.getBounds2D()), SUBTYPES.GEOM2D); |
|
283 |
myFShape = geomManager.createSurface(new GeneralPathX(shape.getBounds2D().getPathIterator(null)), SUBTYPES.GEOM2D);
|
|
284 | 284 |
myFShape.transform(AffineTransform.getTranslateInstance(p.getX(), p.getY())); |
285 | 285 |
|
286 | 286 |
if (rotation != 0) { |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/SimpleFillSymbol.java | ||
---|---|---|
225 | 225 |
rect.setFrame(((int) rect.getMinX())+1, ((int) rect.getMinY())+1, ((int) rect.getWidth())-2, ((int) rect.getHeight())-2); |
226 | 226 |
Geometry geom; |
227 | 227 |
try { |
228 |
geom = geomManager.createSurface(new GeneralPathX(rect), SUBTYPES.GEOM2D); |
|
228 |
geom = geomManager.createSurface(new GeneralPathX(rect.getPathIterator(null)), SUBTYPES.GEOM2D);
|
|
229 | 229 |
} catch (CreateGeometryException e) { |
230 | 230 |
logger.error("Creating a surface", e); |
231 | 231 |
throw new SymbolDrawingException(getSymbolType()); |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/AbstractLineSymbol.java | ||
---|---|---|
243 | 243 |
return shp; |
244 | 244 |
|
245 | 245 |
ArrayList segments = new ArrayList(); //<Point2D[]> |
246 |
GeneralPathX gpx = new GeneralPathX(shp); |
|
246 |
GeneralPathX gpx = new GeneralPathX(shp.getPathIterator(null));
|
|
247 | 247 |
PathIterator it = gpx.getPathIterator(null); |
248 | 248 |
double[] data = new double[6]; |
249 | 249 |
Point2D segmentIni = null; |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/styles/IMask.java | ||
---|---|---|
117 | 117 |
Shape myShp = stroke.createStrokedShape(shp); |
118 | 118 |
Geometry haloShape = null;; |
119 | 119 |
try { |
120 |
haloShape = geomManager.createSurface(new GeneralPathX(myShp.getBounds2D()), SUBTYPES.GEOM2D); |
|
120 |
haloShape = geomManager.createSurface(new GeneralPathX(myShp.getBounds2D().getPathIterator(null)), SUBTYPES.GEOM2D);
|
|
121 | 121 |
} catch (CreateGeometryException e) { |
122 | 122 |
logger.error("Error creating a surface", e); |
123 | 123 |
} |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/rendering/symbols/styles/Line2DOffset.java | ||
---|---|---|
68 | 68 |
public static GeneralPathX offsetLine(Shape p, double offset) { |
69 | 69 |
|
70 | 70 |
if (Math.abs(offset) < 1) { |
71 |
return new GeneralPathX(p); |
|
71 |
return new GeneralPathX(p.getPathIterator(null));
|
|
72 | 72 |
} |
73 | 73 |
PathIterator pi = p.getPathIterator(null); |
74 | 74 |
double[] dataCoords = new double[6]; |
... | ... | |
103 | 103 |
from = first; |
104 | 104 |
try { |
105 | 105 |
offsetSegments.append(offsetAndConsumeClosedSegments( |
106 |
offset, segments), false); |
|
106 |
offset, segments).getPathIterator(null), false);
|
|
107 | 107 |
} catch (NotEnoughSegmentsToClosePathException e) { |
108 | 108 |
logger.error( |
109 | 109 |
e.getMessage(), e); |
... | ... | |
114 | 114 |
|
115 | 115 |
pi.next(); |
116 | 116 |
} |
117 |
offsetSegments.append(offsetAndConsumeSegments(offset, segments), |
|
117 |
offsetSegments.append(offsetAndConsumeSegments(offset, segments).getPathIterator(null),
|
|
118 | 118 |
true); |
119 | 119 |
|
120 | 120 |
return offsetSegments; |
121 | 121 |
} catch (ParallelLinesCannotBeResolvedException e) { |
122 | 122 |
logger.error(e.getMessage(), e); |
123 |
return new GeneralPathX(p); |
|
123 |
return new GeneralPathX(p.getPathIterator(null));
|
|
124 | 124 |
} |
125 | 125 |
} |
126 | 126 |
|
... | ... | |
176 | 176 |
pEnd = eq.resolve(eq1); |
177 | 177 |
} catch (ParallelLinesCannotBeResolvedException e) { //Las lineas son paralelas y NO son la misma. |
178 | 178 |
pEnd = new Point2D.Double(eq.xEnd, eq.yEnd); |
179 |
gpx.append(new Line2D.Double(pIni, pEnd), true); // a?adimos una linea hasta el final del primer segmento |
|
179 |
gpx.append(new Line2D.Double(pIni, pEnd).getPathIterator(null), true); // a?adimos una linea hasta el final del primer segmento
|
|
180 | 180 |
// y asignamos como punto final el principio del siguiente segmento |
181 | 181 |
// para que en la siguiente iteraci?n lo tome como punto inicial. |
182 | 182 |
pIni = pEnd; |
... | ... | |
188 | 188 |
pEnd = new Point2D.Double(eq.xEnd, eq.yEnd); |
189 | 189 |
} |
190 | 190 |
|
191 |
gpx.append(new Line2D.Double(pIni, pEnd), true); |
|
191 |
gpx.append(new Line2D.Double(pIni, pEnd).getPathIterator(null), true);
|
|
192 | 192 |
segments.remove(0); |
193 | 193 |
} |
194 | 194 |
return gpx; |
branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/store/dgn/DGNStoreProvider.java | ||
---|---|---|
675 | 675 |
// a?adimos sin unir al anterior |
676 | 676 |
if (bFirstHoleEntity |
677 | 677 |
|| ((psLine.type == DGNFileHeader.DGNT_SHAPE) && ((psLine.properties & 0x8000) != 0))) { |
678 |
elementoCompuesto.append(elShape, false); |
|
678 |
elementoCompuesto.append(elShape.getPathIterator(null), false);
|
|
679 | 679 |
bFirstHoleEntity = false; |
680 | 680 |
} else { |
681 |
elementoCompuesto.append(elShape, bConnect); |
|
681 |
elementoCompuesto.append(elShape.getPathIterator(null), bConnect);
|
|
682 | 682 |
} |
683 | 683 |
} else { |
684 | 684 |
addShape(createMultiCurve(elShape), auxRow, |
... | ... | |
730 | 730 |
// Ellipse2D.Double(psArc.origin.x - psArc.primary_axis, |
731 | 731 |
// psArc.origin.y - psArc.secondary_axis,2.0 * |
732 | 732 |
// psArc.primary_axis, 2.0 * psArc.secondary_axis); |
733 |
GeneralPathX elShapeArc = new GeneralPathX(elArco); |
|
733 |
GeneralPathX elShapeArc = new GeneralPathX(elArco.getPathIterator(null));
|
|
734 | 734 |
|
735 | 735 |
// Transformamos el GeneralPahtX porque si transformamos |
736 | 736 |
// elArco nos lo convierte |
... | ... | |
775 | 775 |
// Y EL ELEMENTO ES UN POLIGONO |
776 | 776 |
if (bFirstHoleEntity |
777 | 777 |
|| ((elemento.type == DGNFileHeader.DGNT_SHAPE) && ((elemento.properties & 0x8000) != 0))) { |
778 |
elementoCompuesto.append(elShapeArc, false); |
|
778 |
elementoCompuesto.append(elShapeArc.getPathIterator(null), false);
|
|
779 | 779 |
bFirstHoleEntity = false; |
780 | 780 |
} else { |
781 |
elementoCompuesto.append(elShapeArc, bConnect); |
|
781 |
elementoCompuesto.append(elShapeArc.getPathIterator(null), bConnect);
|
|
782 | 782 |
} |
783 | 783 |
} else { |
784 | 784 |
addShape(createMultiCurve(elShapeArc), auxRow, |
Also available in: Unified diff