Ticket #10638: OsmDataLayer.patch
File OsmDataLayer.patch, 1.4 KB (added by , 8 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; … … 403 404 // on some platforms viewport bounds seem to be offset from the left, 404 405 // over-grow it just to be sure 405 406 b.grow(100, 100); 406 Area a = new Area(b);407 Path2D p = new Path2D.Double(); 407 408 408 // now successively subtractdownloaded areas409 // combine successively downloaded areas 409 410 for (Bounds bounds : data.getDataSourceBounds()) { 410 411 if (bounds.isCollapsed()) { 411 412 continue; 412 413 } 413 a.subtract(mv.getState().getArea(bounds));414 p.append(mv.getState().getArea(bounds), false); 414 415 } 416 // subtract combined areas 417 Area a = new Area(b); 418 a.subtract(new Area(p)); 415 419 416 420 // paint remainder 417 421 MapViewPoint anchor = mv.getState().getPointFor(new EastNorth(0, 0));