Changeset 10001 in josm for trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
- Timestamp:
- 2016-03-17T01:50:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r9971 r10001 1013 1013 1014 1014 // How many pixels into the 'source' rectangle are we drawing? 1015 int screen _x_offset = target.x - source.x;1016 int screen _y_offset = target.y - source.y;1015 int screenXoffset = target.x - source.x; 1016 int screenYoffset = target.y - source.y; 1017 1017 // And how many pixels into the image itself does that correlate to? 1018 int img _x_offset = (int) (screen_x_offset * imageXScaling + 0.5);1019 int img _y_offset = (int) (screen_y_offset * imageYScaling + 0.5);1018 int imgXoffset = (int) (screenXoffset * imageXScaling + 0.5); 1019 int imgYoffset = (int) (screenYoffset * imageYScaling + 0.5); 1020 1020 // Now calculate the other corner of the image that we need 1021 1021 // by scaling the 'target' rectangle's dimensions. 1022 int img _x_end = img_x_offset + (int) (target.getWidth() * imageXScaling + 0.5);1023 int img _y_end = img_y_offset + (int) (target.getHeight() * imageYScaling + 0.5);1022 int imgXend = imgXoffset + (int) (target.getWidth() * imageXScaling + 0.5); 1023 int imgYend = imgYoffset + (int) (target.getHeight() * imageYScaling + 0.5); 1024 1024 1025 1025 if (Main.isDebugEnabled()) { … … 1029 1029 target.x, target.y, 1030 1030 target.x + target.width, target.y + target.height, 1031 img _x_offset, img_y_offset,1032 img _x_end, img_y_end,1031 imgXoffset, imgYoffset, 1032 imgXend, imgYend, 1033 1033 this); 1034 1034 if (PROP_FADE_AMOUNT.get() != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.