Changeset 33260 in osm for applications
- Timestamp:
- 2017-04-17T02:44:22+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java
r33237 r33260 27 27 import org.openstreetmap.josm.gui.MapView; 28 28 import org.openstreetmap.josm.gui.layer.Layer; 29 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 30 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 31 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 29 32 30 33 /** … … 41 44 42 45 /** 43 * The factor for scaling the printing graphics to the desired 44 * resolution 46 * The factor for scaling the printing graphics to the desired resolution 45 47 */ 46 48 protected double g2dFactor; … … 219 221 double dist100px = getDist100Pixel() / g2dFactor; 220 222 double dist = dist100px / som.aValue; 221 //String unit = som.aName;222 223 if (!Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false) && dist > som.bValue / som.aValue) { 223 224 dist = dist100px / som.bValue; 224 //unit = som.bName;225 225 } 226 226 long distExponent = (long) Math.floor(Math.log(dist) / Math.log(10)); 227 227 double distMantissa = dist / Math.pow(10, distExponent); 228 double distScale = 1.0;228 double distScale; 229 229 if (distMantissa <= 2.5) { 230 230 distScale = 2.5 / distMantissa; … … 346 346 g2d.setTransform(ax); 347 347 } 348 349 @Override 350 public void layerAdded(LayerAddEvent e) { 351 // Don't mess with global stuff done by MapView 352 } 353 354 @Override 355 public void layerRemoving(LayerRemoveEvent e) { 356 // Don't mess with global stuff done by MapView 357 } 358 359 @Override 360 public void layerOrderChanged(LayerOrderChangeEvent e) { 361 // Don't mess with global stuff done by MapView 362 } 348 363 }
Note:
See TracChangeset
for help on using the changeset viewer.