Ignore:
Timestamp:
2016-01-01T23:55:22+01:00 (8 years ago)
Author:
stoecker
Message:

see #10684 - extend SVG with small dimension when a larger image is requested

File:
1 edited

Legend:

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

    r9078 r9251  
    163163            realWidth = svg.getWidth();
    164164            realHeight = svg.getHeight();
     165            /* extend small images to the possible maximum, may get reduced later again */
     166            if(maxSize.width != -1 && realWidth < maxSize.width) {
     167                realHeight *= maxSize.width/realWidth;
     168                realWidth = maxSize.width;
     169            }
     170            if(maxSize.height != -1 && realHeight < maxSize.height) {
     171                realWidth *= maxSize.height/realHeight;
     172                realHeight = maxSize.height;
     173            }
    165174        } else {
    166175            if (baseImage == null) throw new AssertionError();
Note: See TracChangeset for help on using the changeset viewer.