Revision 2107
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.ellipse/src/main/java/org/gvsig/vectorediting/lib/prov/ellipse/EllipseEditingProvider.java | ||
---|---|---|
57 | 57 |
|
58 | 58 |
Point firstPointAxis1Value = (Point) values.get(firstPointAxisA); |
59 | 59 |
Point secondPointAxis1Value = (Point) values.get(secondPointAxisA); |
60 |
double lengthAxis2Value = (Double) values.get(lengthAxisB);
|
|
60 |
double lengthSemiaxis2Value = (Double) values.get(lengthSemiAxisB);
|
|
61 | 61 |
|
62 | 62 |
if ((firstPointAxis1Value != null) |
63 |
&& (secondPointAxis1Value != null) && (lengthAxis2Value > 0)) {
|
|
63 |
&& (secondPointAxis1Value != null) && (lengthSemiaxis2Value > 0)) {
|
|
64 | 64 |
|
65 | 65 |
try { |
66 | 66 |
GeometryType storeGeomType = editingProviderService.getGeomType(featureStore); |
67 | 67 |
int subtype = storeGeomType.getSubType(); |
68 | 68 |
|
69 | 69 |
PeriEllipse periEllipse = (PeriEllipse) GeometryLocator.getGeometryManager().create(Geometry.TYPES.PERIELLIPSE, subtype); |
70 |
periEllipse.setPoints(firstPointAxis1Value, secondPointAxis1Value, lengthAxis2Value / 2);
|
|
70 |
periEllipse.setPoints(firstPointAxis1Value, secondPointAxis1Value, lengthSemiaxis2Value);
|
|
71 | 71 |
|
72 | 72 |
if (storeGeomType.isTypeOf(MULTICURVE)) { |
73 | 73 |
MultiCurve multicurve; |
... | ... | |
87 | 87 |
return null; |
88 | 88 |
} |
89 | 89 |
|
90 |
@Override |
|
90 | 91 |
public String getName() { |
91 | 92 |
return EllipseEditingProviderFactory.PROVIDER_NAME; |
92 | 93 |
} |
93 | 94 |
|
94 |
// protected void addEllipseToStatus(DefaultDrawingStatus drawingStatus, Geometry ellipse) { |
|
95 |
// EditingProviderManager editingProviderManager = EditingProviderLocator.getProviderManager(); |
|
96 |
// ISymbol lineSymbolEditing = editingProviderManager.getSymbol("line-symbol-editing"); |
|
97 |
// drawingStatus.addStatus(ellipse, lineSymbolEditing, ""); |
|
98 |
// } |
|
99 |
|
|
100 | 95 |
/** |
101 | 96 |
* @param drawingStatus |
102 | 97 |
* @param firstPointAxis1Value |
Also available in: Unified diff