Changeset 6290 in josm
- Timestamp:
- 2013-10-03T23:58:56+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r6160 r6290 71 71 ImageIcon icon = new ImageIcon(base); 72 72 if (width == -1) { 73 width = icon.getIconWidth() * height / icon.getIconHeight(); 73 width = Math.max(1, icon.getIconWidth() * height / icon.getIconHeight()); 74 74 } else if (height == -1) { 75 height = icon.getIconHeight() * width / icon.getIconWidth(); 75 height = Math.max(1, icon.getIconHeight() * width / icon.getIconWidth()); 76 76 } 77 77 Image i = icon.getImage().getScaledInstance(width, height, Image.SCALE_SMOOTH);
Note:
See TracChangeset
for help on using the changeset viewer.