- Timestamp:
- 2016-06-12T12:10:45+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10358 r10359 754 754 755 755 /** 756 * Scale image to virtual dimensions. This util method is used to hide real sizes calculations.757 * All other classes should use this method to resize images.758 *759 * @param im image to be resized760 * @param virtualWidth target width of image in virtual pixels761 * @param virtualHeight target height of image in virtual pixels762 * @return new scaled image in real dimensions763 */764 public static ImageIcon getScaledIcon(Image im, int virtualWidth, int virtualHeight) {765 int realWidth = GuiSizesHelper.getSizeDpiAdjusted(virtualWidth);766 int realHeight = GuiSizesHelper.getSizeDpiAdjusted(virtualHeight);767 768 return new ImageIcon(im.getScaledInstance(realWidth, realHeight, Image.SCALE_SMOOTH));769 }770 771 /**772 756 * {@code data:[<mediatype>][;base64],<data>} 773 757 * @see <a href="http://tools.ietf.org/html/rfc2397">RFC2397</a>
Note:
See TracChangeset
for help on using the changeset viewer.