Changeset 11226 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-11-09T00:27:35+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r11173 r11226 420 420 } 421 421 422 private void paintLayer(Layer layer, Graphics2D g, Bounds box) { 422 /** 423 * Paints the given layer to the graphics object, using the current state of this map view. 424 * @param layer The layer to draw. 425 * @param g A graphics object. It should have the width and height of this component 426 * @throws IllegalArgumentException If the layer is not part of this map view. 427 * @since 11226 428 */ 429 public void paintLayer(Layer layer, Graphics2D g) { 423 430 try { 424 431 LayerPainter painter = registeredLayers.get(layer); … … 435 442 g.setPaintMode(); 436 443 } catch (RuntimeException t) { 437 BugReport.intercept(t).put("layer", layer). put("bounds", box).warn();444 BugReport.intercept(t).put("layer", layer).warn(); 438 445 } 439 446 } … … 480 487 Graphics2D tempG = offscreenBuffer.createGraphics(); 481 488 tempG.setClip(g.getClip()); 482 Bounds box = getLatLonBounds(g.getClipBounds());483 489 484 490 if (!canUseBuffer || nonChangedLayersBuffer == null) { … … 493 499 494 500 for (int i = 0; i < nonChangedLayersCount; i++) { 495 paintLayer(visibleLayers.get(i), g2 , box);501 paintLayer(visibleLayers.get(i), g2); 496 502 } 497 503 } else { … … 501 507 g2.setClip(g.getClip()); 502 508 for (int i = nonChangedLayers.size(); i < nonChangedLayersCount; i++) { 503 paintLayer(visibleLayers.get(i), g2 , box);509 paintLayer(visibleLayers.get(i), g2); 504 510 } 505 511 } … … 514 520 515 521 for (int i = nonChangedLayersCount; i < visibleLayers.size(); i++) { 516 paintLayer(visibleLayers.get(i), tempG , box);522 paintLayer(visibleLayers.get(i), tempG); 517 523 } 518 524 519 525 try { 520 drawTemporaryLayers(tempG, box);526 drawTemporaryLayers(tempG, getLatLonBounds(g.getClipBounds())); 521 527 } catch (RuntimeException e) { 522 528 BugReport.intercept(e).put("temporaryLayers", temporaryLayers).warn();
Note:
See TracChangeset
for help on using the changeset viewer.