Changeset 16926 in josm for trunk/src/org/openstreetmap/josm/tools/ImageResource.java
- Timestamp:
- 2020-08-24T21:56:26+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r16486 r16926 297 297 */ 298 298 public ImageIcon getPaddedIcon(Dimension iconSize) { 299 final ImageIcon imageIcon = getImageIcon(iconSize); 300 if (imageIcon.getIconWidth() == iconSize.width && imageIcon.getIconHeight() == iconSize.height) { 301 // fast path for square and svg icons 302 return imageIcon; 303 } 304 299 305 final Dimension cacheKey = new Dimension(-iconSize.width, -iconSize.height); // use negative width/height for differentiation 300 306 BufferedImage image = imgCache.get(cacheKey);
Note:
See TracChangeset
for help on using the changeset viewer.