Changeset 10484 in josm


Ignore:
Timestamp:
2016-06-24T22:35:50+02:00 (5 years ago)
Author:
stoecker
Message:

see #9995 - don't expose GuiSizesHelper for image purpose

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java

    r10433 r10484  
    3636import org.openstreetmap.josm.gui.io.UploadNoteLayerTask;
    3737import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    38 import org.openstreetmap.josm.gui.util.GuiSizesHelper;
    3938import org.openstreetmap.josm.io.NoteExporter;
    4039import org.openstreetmap.josm.io.OsmApi;
     
    108107    @Override
    109108    public void paint(Graphics2D g, MapView mv, Bounds box) {
    110         final int iconHeight = GuiSizesHelper.getSizeDpiAdjusted(ImageProvider.ImageSizes.SMALLICON.getVirtualHeight());
    111         final int iconWidth = GuiSizesHelper.getSizeDpiAdjusted(ImageProvider.ImageSizes.SMALLICON.getVirtualWidth());
     109        final int iconHeight = ImageProvider.ImageSizes.SMALLICON.getAdjustedHeight();
     110        final int iconWidth = ImageProvider.ImageSizes.SMALLICON.getAdjustedWidth();
    112111
    113112        for (Note note : noteData.getNotes()) {
     
    247246        double snapDistance = 10;
    248247        double minDistance = Double.MAX_VALUE;
    249         final int iconHeight = GuiSizesHelper.getSizeDpiAdjusted(ImageProvider.ImageSizes.SMALLICON.getVirtualHeight());
     248        final int iconHeight = ImageProvider.ImageSizes.SMALLICON.getAdjustedHeight();
    250249        Note closestNote = null;
    251250        for (Note note : noteData.getNotes()) {
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r10462 r10484  
    208208         * Returns the image width in virtual pixels
    209209         * @return the image width in virtual pixels
     210         * @since 9705
    210211         */
    211212        public int getVirtualWidth() {
     
    220221        public int getVirtualHeight() {
    221222            return virtualHeight;
     223        }
     224
     225        /**
     226         * Returns the image width in pixels to use for display
     227         * @return the image width in pixels to use for display
     228         * @since 10484
     229         */
     230        public int getAdjustedWidth() {
     231            return  GuiSizesHelper.getSizeDpiAdjusted(virtualWidth);
     232        }
     233
     234        /**
     235         * Returns the image height in pixels to use for display
     236         * @return the image height in pixels to use for display
     237         * @since 10484
     238         */
     239        public int getAdjustedHeight() {
     240            return  GuiSizesHelper.getSizeDpiAdjusted(virtualHeight);
    222241        }
    223242
Note: See TracChangeset for help on using the changeset viewer.