Changeset 7081 in josm for trunk/src/org/openstreetmap/josm/data/osm
- Timestamp:
- 2014-05-09T04:49:54+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r7080 r7081 80 80 final public static int noThreads; 81 81 final public static ExecutorService styleCreatorPool; 82 82 83 83 static { 84 84 noThreads = Main.pref.getInteger( … … 330 330 private boolean leftHandTraffic; 331 331 332 /** 333 * Constructs a new {@code StyledMapRenderer}. 334 * 335 * @param g the graphics context. Must not be null. 336 * @param nc the map viewport. Must not be null. 337 * @param isInactiveMode if true, the paint visitor shall render OSM objects such that they 338 * look inactive. Example: rendering of data in an inactive layer using light gray as color only. 339 * @throws IllegalArgumentException thrown if {@code g} is null 340 * @throws IllegalArgumentException thrown if {@code nc} is null 341 */ 332 342 public StyledMapRenderer(Graphics2D g, NavigatableComponent nc, boolean isInactiveMode) { 333 343 super(g, nc, isInactiveMode); … … 1329 1339 return null; 1330 1340 } 1331 1341 1332 1342 @Override 1333 1343 public void render(final DataSet data, boolean renderVirtualNodes, Bounds bounds) { … … 1343 1353 1344 1354 highlightWaySegments = data.getHighlightedWaySegments(); 1345 1355 1346 1356 long timeStart=0, timePhase1=0, timeFinished; 1347 1357 if (Main.isTraceEnabled()) { … … 1369 1379 this.output = output; 1370 1380 } 1371 1381 1372 1382 @Override 1373 1383 public List<StyleRecord> call() throws Exception { … … 1380 1390 return output; 1381 1391 } 1382 1392 1383 1393 @Override 1384 1394 public void visit(Node n) { … … 1456 1466 1457 1467 final List<StyleRecord> allStyleElems = new ArrayList<>(nodes.size()+ways.size()+relations.size()); 1458 1468 1459 1469 class ConcurrentTasksHelper { 1460 1470 1461 1471 void process(List<? extends OsmPrimitive> prims) { 1462 1472 final List<ComputeStyleListWorker> tasks = new ArrayList<>(); … … 1490 1500 } 1491 1501 ConcurrentTasksHelper helper = new ConcurrentTasksHelper(); 1492 1502 1493 1503 // Need to process all relations first. 1494 1504 // Reason: Make sure, ElemStyles.getStyleCacheWithRange is … … 1505 1515 System.err.print("phase 1 (calculate styles): " + (timePhase1 - timeStart) + " ms"); 1506 1516 } 1507 1517 1508 1518 Collections.sort(allStyleElems); 1509 1519 1510 1520 for (StyleRecord r : allStyleElems) { 1511 1521 r.style.paintPrimitive(
Note:
See TracChangeset
for help on using the changeset viewer.