Revision 5878 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/PolygonCADTool.java
PolygonCADTool.java | ||
---|---|---|
46 | 46 |
import java.awt.geom.Point2D; |
47 | 47 |
|
48 | 48 |
import com.iver.andami.PluginServices; |
49 |
import com.iver.cit.gvsig.fmap.core.FPolygon2D; |
|
49 | 50 |
import com.iver.cit.gvsig.fmap.core.FPolyline2D; |
50 | 51 |
import com.iver.cit.gvsig.fmap.core.FShape; |
51 | 52 |
import com.iver.cit.gvsig.fmap.core.GeneralPathX; |
52 | 53 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
53 | 54 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
55 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
54 | 56 |
import com.iver.cit.gvsig.fmap.edition.UtilFunctions; |
55 | 57 |
import com.iver.cit.gvsig.gui.cad.CADTool; |
56 | 58 |
import com.iver.cit.gvsig.gui.cad.DefaultCADTool; |
... | ... | |
261 | 263 |
} |
262 | 264 |
//elShape.lineTo(firstPoint.getX(),firstPoint.getY()); |
263 | 265 |
elShape.closePath(); |
264 |
return ShapeFactory.createGeometry(new FPolyline2D(elShape)); |
|
266 |
IGeometry geom=ShapeFactory.createPolygon2D(elShape); |
|
267 |
// try { |
|
268 |
// if (getVLE().getVEA().getShapeType()==FShape.LINE) |
|
269 |
// geom.setGeometryType(FShape.LINE); |
|
270 |
// else |
|
271 |
// geom.setGeometryType(FShape.POLYGON); |
|
272 |
// } catch (DriverIOException e) { |
|
273 |
// e.printStackTrace(); |
|
274 |
// } |
|
275 |
return geom; |
|
265 | 276 |
} |
266 | 277 |
|
267 | 278 |
/** |
... | ... | |
299 | 310 |
} |
300 | 311 |
//elShape.lineTo(firstPoint.getX(),firstPoint.getY()); |
301 | 312 |
elShape.closePath(); |
302 |
return ShapeFactory.createGeometry(new FPolyline2D(elShape)); |
|
313 |
IGeometry geom=ShapeFactory.createPolygon2D(elShape); |
|
314 |
// try { |
|
315 |
// if (getVLE().getVEA().getShapeType()==FShape.LINE) |
|
316 |
// geom.setGeometryType(FShape.LINE); |
|
317 |
// else |
|
318 |
// geom.setGeometryType(FShape.POLYGON); |
|
319 |
// } catch (DriverIOException e) { |
|
320 |
// e.printStackTrace(); |
|
321 |
// } |
|
322 |
return geom; |
|
303 | 323 |
} |
304 | 324 |
/** |
305 | 325 |
* Devuelve la geometr?a con el poligono regular circunscrito a la |
Also available in: Unified diff