- Timestamp:
- 2017-12-02T21:06:00+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDataText.java
r13167 r13186 221 221 Pair<Integer, Hemisphere> utmZone = TransverseMercator.locateUtmZone(n.getCoor()); 222 222 String utmLabel = tr("UTM Zone"); 223 add(utmLabel, utmLabel.endsWith(":") ? " " : ": ", Integer.toString(utmZone.a), utmZone.b. toString().substring(0, 1));223 add(utmLabel, utmLabel.endsWith(":") ? " " : ": ", Integer.toString(utmZone.a), utmZone.b.name().substring(0, 1)); 224 224 } 225 225 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r13131 r13186 779 779 780 780 // overscan to prevent empty edges when zooming in to zoom scales > 2:1 781 if (w > imgRect.width && h > imgRect.height && !imgRect.isFullView1D()) { 782 if (wFact != hFact) { 783 if (wFact > hFact) { 784 w = compRect.width; 785 x = 0; 786 h = wFact / imgRect.width; 787 y = (compRect.height - h) / 2; 788 } else { 789 h = compRect.height; 790 y = 0; 791 w = hFact / imgRect.height; 792 x = (compRect.width - w) / 2; 793 } 781 if (w > imgRect.width && h > imgRect.height && !imgRect.isFullView1D() && wFact != hFact) { 782 if (wFact > hFact) { 783 w = compRect.width; 784 x = 0; 785 h = wFact / imgRect.width; 786 y = (compRect.height - h) / 2; 787 } else { 788 h = compRect.height; 789 y = 0; 790 w = hFact / imgRect.height; 791 x = (compRect.width - w) / 2; 794 792 } 795 793 } -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r13129 r13186 1973 1973 * Converts an {@link Rectangle} area of {@link Image} to a {@link BufferedImage} instance. 1974 1974 * @param image image to convert 1975 * @param crop _area rectangle to crop image with1975 * @param cropArea rectangle to crop image with 1976 1976 * @return a {@code BufferedImage} instance for the cropped area of {@code Image}. 1977 1977 * @since 13127 1978 1978 */ 1979 public static BufferedImage toBufferedImage(Image image, Rectangle crop _area) {1979 public static BufferedImage toBufferedImage(Image image, Rectangle cropArea) { 1980 1980 BufferedImage buffImage = null; 1981 1981 Rectangle r = new Rectangle(image.getWidth(null), image.getHeight(null)); 1982 if (r.intersection(crop _area).equals(crop_area)) {1983 buffImage = new BufferedImage(crop _area.width, crop_area.height, BufferedImage.TYPE_INT_ARGB);1982 if (r.intersection(cropArea).equals(cropArea)) { 1983 buffImage = new BufferedImage(cropArea.width, cropArea.height, BufferedImage.TYPE_INT_ARGB); 1984 1984 Graphics2D g2 = buffImage.createGraphics(); 1985 g2.drawImage(image, 0, 0, crop _area.width, crop_area.height,1986 crop _area.x, crop_area.y, crop_area.x + crop_area.width, crop_area.y + crop_area.height, null);1985 g2.drawImage(image, 0, 0, cropArea.width, cropArea.height, 1986 cropArea.x, cropArea.y, cropArea.x + cropArea.width, cropArea.y + cropArea.height, null); 1987 1987 g2.dispose(); 1988 1988 }
Note:
See TracChangeset
for help on using the changeset viewer.