Changeset 10359 in josm for trunk/src/org


Ignore:
Timestamp:
2016-06-12T12:10:45+02:00 (8 years ago)
Author:
stoecker
Message:

see #9995 - overlooked part of the code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r10358 r10359  
    754754
    755755    /**
    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 resized
    760      * @param virtualWidth target width of image in virtual pixels
    761      * @param virtualHeight target height of image in virtual pixels
    762      * @return new scaled image in real dimensions
    763      */
    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     /**
    772756     * {@code data:[<mediatype>][;base64],<data>}
    773757     * @see <a href="http://tools.ietf.org/html/rfc2397">RFC2397</a>
Note: See TracChangeset for help on using the changeset viewer.