Ignore:
Timestamp:
2020-09-02T19:58:37+02:00 (4 years ago)
Author:
simon04
Message:

see #19706, see #19725 - ImageProvider: re-activate upscaling of SVG images

File:
1 edited

Legend:

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

    r16978 r16997  
    3333        @Override
    3434        Dimension computeDimension(Dimension dim, Dimension icon) {
     35            final int maxWidth = Math.min(dim.width, icon.width);
     36            final int maxHeight = Math.min(dim.height, icon.height);
     37            return BOUNDED_UPSCALE.computeDimension(new Dimension(maxWidth, maxHeight), icon);
     38        }
     39    },
     40
     41    BOUNDED_UPSCALE {
     42        @Override
     43        Dimension computeDimension(Dimension dim, Dimension icon) {
    3544            CheckParameterUtil.ensureThat((dim.width > 0 || dim.width == -1) && (dim.height > 0 || dim.height == -1),
    3645                    () -> dim + " is invalid");
    37             final int maxWidth = Math.min(dim.width, icon.width);
    38             final int maxHeight = Math.min(dim.height, icon.height);
     46            final int maxWidth = dim.width;
     47            final int maxHeight = dim.height;
    3948            final Dimension spec;
    4049            if (maxWidth == -1 || maxHeight == -1) {
Note: See TracChangeset for help on using the changeset viewer.