Revision 43478 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/ViewPort.java
ViewPort.java | ||
---|---|---|
31 | 31 |
import java.awt.geom.Point2D; |
32 | 32 |
import java.awt.geom.Rectangle2D; |
33 | 33 |
import java.util.ArrayList; |
34 |
import java.util.Objects; |
|
34 | 35 |
|
35 | 36 |
import org.cresques.cts.GeoCalc; |
36 | 37 |
import org.cresques.cts.IProjection; |
... | ... | |
855 | 856 |
|
856 | 857 |
this.updateDrawVersion(); |
857 | 858 |
this.extent = newExtent; |
859 |
try { |
|
860 |
calculateAffineTransform(); |
|
861 |
} catch(Exception ex) { |
|
862 |
this.extent = null; |
|
863 |
throw ex; |
|
864 |
} |
|
858 | 865 |
extentsHistory.put(extent); |
859 | 866 |
|
860 |
// Calcula la transformaci�n af�n |
|
861 |
calculateAffineTransform(); |
|
862 | 867 |
|
863 |
|
|
864 | 868 |
// Lanzamos los eventos de extent cambiado |
865 | 869 |
callExtentChanged(getAdjustedExtent()); |
866 | 870 |
} |
... | ... | |
1161 | 1165 |
dist3pixel = 3 * pProv.x; |
1162 | 1166 |
} |
1163 | 1167 |
catch (NoninvertibleTransformException e) { |
1164 |
System.err.println("transformada afin = " + trans.toString()); |
|
1165 |
System.err.println("extent = " + extent.toString() + " imageSize= " |
|
1166 |
+ imageSize.toString()); |
|
1167 |
throw new RuntimeException("Non invertible transform Exception", e); |
|
1168 |
String msg = "Can't calculate affine transform for the view port." + "\n" + |
|
1169 |
"The extent can be out of range for this projection." + "\n" + |
|
1170 |
"transformada afin: " + Objects.toString(trans) + "\n" + |
|
1171 |
"extent: " + Objects.toString(extent) + "\n" + |
|
1172 |
"imageSize: " + Objects.toString(imageSize) + "\n" + |
|
1173 |
"projection: " + Objects.toString(proj) + "\n" + |
|
1174 |
e.getLocalizedMessage() |
|
1175 |
; |
|
1176 |
logger.error(msg, e); |
|
1177 |
trans.setToIdentity(); |
|
1178 |
scale = 0; |
|
1179 |
adjustedExtent = null; |
|
1180 |
adjustableExtent = true; |
|
1181 |
throw new RuntimeException(msg, e); |
|
1168 | 1182 |
} |
1169 | 1183 |
} |
1170 | 1184 |
|
Also available in: Unified diff