Ticket #10638: 10638-v5.patch
File 10638-v5.patch, 1.4 KB (added by , 7 years ago) |
---|
-
src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
16 16 import java.awt.TexturePaint; 17 17 import java.awt.event.ActionEvent; 18 18 import java.awt.geom.Area; 19 import java.awt.geom.Path2D; 19 20 import java.awt.geom.Rectangle2D; 20 21 import java.awt.image.BufferedImage; 21 22 import java.io.File; … … 411 412 // on some platforms viewport bounds seem to be offset from the left, 412 413 // over-grow it just to be sure 413 414 b.grow(100, 100); 414 Area a = new Area(b);415 Path2D p = new Path2D.Double(); 415 416 416 // now successively subtractdownloaded areas417 // combine successively downloaded areas 417 418 for (Bounds bounds : data.getDataSourceBounds()) { 418 419 if (bounds.isCollapsed()) { 419 420 continue; 420 421 } 421 a.subtract(mv.getState().getArea(bounds));422 p.append(mv.getState().getArea(bounds), false); 422 423 } 424 // subtract combined areas 425 Area a = new Area(b); 426 a.subtract(new Area(p)); 423 427 424 428 // paint remainder 425 429 MapViewPoint anchor = mv.getState().getPointFor(new EastNorth(0, 0));