- Timestamp:
- 2019-01-28T10:05:18+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r14456 r14748 350 350 @Override 351 351 public void paint(MapViewGraphics graphics) { 352 List<WayPoint> visibleSegments = listVisibleSegments(graphics.getClipBounds().getLatLonBoundsBox()); 352 Bounds clipBounds = graphics.getClipBounds().getLatLonBoundsBox(); 353 List<WayPoint> visibleSegments = listVisibleSegments(clipBounds); 353 354 if (!visibleSegments.isEmpty()) { 354 355 readPreferences(layer.getName()); 355 drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), visibleSegments );356 drawAll(graphics.getDefaultGraphics(), graphics.getMapView(), visibleSegments, clipBounds); 356 357 if (graphics.getMapView().getLayerManager().getActiveLayer() == layer) { 357 358 drawColorBar(graphics.getDefaultGraphics(), graphics.getMapView()); … … 411 412 * @param mv the meta data to current displayed area 412 413 * @param visibleSegments segments visible in the current scope of mv 413 */ 414 public void drawAll(Graphics2D g, MapView mv, List<WayPoint> visibleSegments) { 414 * @param clipBounds the clipping rectangle for the current view 415 * @since 14748 : new parameter clipBounds 416 */ 417 418 public void drawAll(Graphics2D g, MapView mv, List<WayPoint> visibleSegments, Bounds clipBounds) { 415 419 416 420 final long timeStart = System.currentTimeMillis(); … … 421 425 if (!computeCacheInSync) { // don't compute if the cache is good 422 426 calculateColors(); 427 // update the WaiPoint.drawline attributes 428 visibleSegments.clear(); 429 visibleSegments.addAll(listVisibleSegments(clipBounds)); 423 430 } 424 431
Note:
See TracChangeset
for help on using the changeset viewer.