Changeset 10001 in josm for trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.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/bbox/TileSelectionBBoxChooser.java
r9078 r10001 154 154 155 155 // calc the screen coordinates for the new selection rectangle 156 MapMarkerDot xmin_ymin = new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon());157 MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());158 159 156 List<MapMarker> marker = new ArrayList<>(2); 160 marker.add( xmin_ymin);161 marker.add( xmax_ymax);157 marker.add(new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon())); 158 marker.add(new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon())); 162 159 mapViewer.setBoundingBox(bbox); 163 160 mapViewer.setMapMarkerList(marker); … … 704 701 int zoomDiff = MAX_ZOOM - zoom; 705 702 Point tlc = getTopLeftCoordinates(); 706 int x _min = (min.x >> zoomDiff) - tlc.x;707 int y _min = (min.y >> zoomDiff) - tlc.y;708 int x _max = (max.x >> zoomDiff) - tlc.x;709 int y _max = (max.y >> zoomDiff) - tlc.y;710 711 int w = x _max - x_min;712 int h = y _max - y_min;703 int xMin = (min.x >> zoomDiff) - tlc.x; 704 int yMin = (min.y >> zoomDiff) - tlc.y; 705 int xMax = (max.x >> zoomDiff) - tlc.x; 706 int yMax = (max.y >> zoomDiff) - tlc.y; 707 708 int w = xMax - xMin; 709 int h = yMax - yMin; 713 710 g.setColor(new Color(0.9f, 0.7f, 0.7f, 0.6f)); 714 g.fillRect(x _min, y_min, w, h);711 g.fillRect(xMin, yMin, w, h); 715 712 716 713 g.setColor(Color.BLACK); 717 g.drawRect(x _min, y_min, w, h);714 g.drawRect(xMin, yMin, w, h); 718 715 } catch (Exception e) { 719 716 Main.error(e);
Note:
See TracChangeset
for help on using the changeset viewer.