Ignore:
Timestamp:
2013-04-23T13:17:15+02:00 (12 years ago)
Author:
donvip
Message:

[josm_plugins] Do not use Main.map.mapView instead of mv parameter in paint() methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java

    r28954 r29531  
    162162
    163163            // Position image at the right graphical place
    164             EastNorth center = Main.map.mapView.getCenter();
    165             EastNorth leftop = Main.map.mapView.getEastNorth(0, 0);
    166             double pixel_per_east_unit = (Main.map.mapView.getWidth() / 2.0)
     164            EastNorth center = mv.getCenter();
     165            EastNorth leftop = mv.getEastNorth(0, 0);
     166            double pixel_per_east_unit = (mv.getWidth() / 2.0)
    167167                    / (center.east() - leftop.east());
    168             double pixel_per_north_unit = (Main.map.mapView.getHeight() / 2.0)
     168            double pixel_per_north_unit = (mv.getHeight() / 2.0)
    169169                    / (leftop.north() - center.north());
    170170
     
    182182
    183183            // Determine scale to fit JOSM extents
    184             ProjectionBounds projbounds = Main.map.mapView
    185                     .getProjectionBounds();
     184            ProjectionBounds projbounds = mv.getProjectionBounds();
    186185
    187186            double width = projbounds.maxEast - projbounds.minEast;
     
    193192                    / height;
    194193
    195             double pixels4bbox_width = ratio_x * Main.map.mapView.getWidth();
    196             double pixels4bbox_height = ratio_y * Main.map.mapView.getHeight();
     194            double pixels4bbox_width = ratio_x * mv.getWidth();
     195            double pixels4bbox_height = ratio_y * mv.getHeight();
    197196
    198197            // Scale image to JOSM extents
Note: See TracChangeset for help on using the changeset viewer.