Changeset 13127 in josm for trunk/test


Ignore:
Timestamp:
2017-11-19T00:10:41+01:00 (2 years ago)
Author:
Don-vip
Message:

see #15476, fix #15511 - fix image scaling regression and makes geoimage feature more configurable through prefs (adjustable max zoom, zoom-step, click zooming with mouse buttons (e.g. if a mouse wheel is not present). Patch by cmuelle8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplayTest.java

    r11539 r13127  
    99import org.junit.Rule;
    1010import org.junit.Test;
     11import org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay.VisRect;
    1112import org.openstreetmap.josm.testutils.JOSMTestRules;
    1213
     
    3031    public void testCalculateDrawImageRectangle() {
    3132        assertEquals(new Rectangle(),
    32                 ImageDisplay.calculateDrawImageRectangle(new Rectangle(), new Dimension()));
     33                ImageDisplay.calculateDrawImageRectangle(new VisRect(), new Dimension()));
    3334        assertEquals(new Rectangle(0, 0, 10, 5),
    34                 ImageDisplay.calculateDrawImageRectangle(new Rectangle(0, 0, 10, 5), new Dimension(10, 5)));
     35                ImageDisplay.calculateDrawImageRectangle(new VisRect(0, 0, 10, 5), new Dimension(10, 5)));
    3536        assertEquals(new Rectangle(0, 0, 10, 5),
    36                 ImageDisplay.calculateDrawImageRectangle(new Rectangle(0, 0, 20, 10), new Dimension(10, 5)));
     37                ImageDisplay.calculateDrawImageRectangle(new VisRect(0, 0, 20, 10), new Dimension(10, 5)));
    3738        assertEquals(new Rectangle(0, 0, 20, 10),
    38                 ImageDisplay.calculateDrawImageRectangle(new Rectangle(0, 0, 10, 5), new Dimension(20, 10)));
     39                ImageDisplay.calculateDrawImageRectangle(new VisRect(0, 0, 10, 5), new Dimension(20, 10)));
    3940        assertEquals(new Rectangle(5, 0, 24, 12),
    40                 ImageDisplay.calculateDrawImageRectangle(new Rectangle(0, 0, 10, 5), new Dimension(35, 12)));
     41                ImageDisplay.calculateDrawImageRectangle(new VisRect(0, 0, 10, 5), new Dimension(35, 12)));
    4142        assertEquals(new Rectangle(0, 1, 8, 4),
    42                 ImageDisplay.calculateDrawImageRectangle(new Rectangle(0, 0, 10, 5), new Dimension(8, 6)));
     43                ImageDisplay.calculateDrawImageRectangle(new VisRect(0, 0, 10, 5), new Dimension(8, 6)));
    4344    }
    4445}
Note: See TracChangeset for help on using the changeset viewer.