- Timestamp:
- 2014-08-12T11:36:47+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r7109 r7378 70 70 import org.openstreetmap.josm.gui.mappaint.StyleCache.StyleList; 71 71 import org.openstreetmap.josm.gui.mappaint.TextElement; 72 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector; 72 73 import org.openstreetmap.josm.tools.CompositeList; 73 74 import org.openstreetmap.josm.tools.ImageProvider; … … 1244 1245 Main.pref.getBoolean("mappaint.use-antialiasing", true) ? 1245 1246 RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); 1246 1247 1247 1248 highlightLineWidth = Main.pref.getInteger("mappaint.highlight.width", 4); 1248 1249 highlightPointRadius = Main.pref.getInteger("mappaint.highlight.radius", 7); … … 1488 1489 List<Way> ways = data.searchWays(bbox); 1489 1490 List<Relation> relations = data.searchRelations(bbox); 1490 1491 1491 1492 final List<StyleRecord> allStyleElems = new ArrayList<>(nodes.size()+ways.size()+relations.size()); 1492 1493 1493 1494 ConcurrentTasksHelper helper = new ConcurrentTasksHelper(allStyleElems, data); 1494 1495 … … 1506 1507 } 1507 1508 1508 Collections.sort(allStyleElems); 1509 Collections.sort(allStyleElems); // TODO: try parallel sort when switching to Java 8 1509 1510 1510 1511 for (StyleRecord r : allStyleElems) { … … 1517 1518 ); 1518 1519 } 1519 1520 1520 1521 if (Main.isTraceEnabled()) { 1521 1522 timeFinished = System.currentTimeMillis(); 1522 System.err.println("; phase 2 (draw): " + (timeFinished - timePhase1) + " ms; total: " + (timeFinished - timeStart) + " ms"); 1523 } 1524 1523 System.err.println("; phase 2 (draw): " + (timeFinished - timePhase1) + " ms; total: " + (timeFinished - timeStart) + " ms" + 1524 " (scale: " + circum + " zoom level: " + Selector.GeneralSelector.scale2level(circum) + ")"); 1525 } 1526 1525 1527 drawVirtualNodes(data, bbox); 1526 1528 } finally { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
r7069 r7378 36 36 this.key = key; 37 37 this.isSetInstruction = isSetInstruction; 38 if (val instanceof LiteralExpression) { 38 if (val instanceof Keyword) { 39 if ("none".equals(((Keyword) val).val)) { 40 this.val = null; 41 } else { 42 this.val = val; 43 } 44 } else if (val instanceof LiteralExpression) { 39 45 Object litValue = ((LiteralExpression) val).evaluate(null); 40 46 if (key.equals(TEXT)) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r7285 r7378 596 596 return 2.0 * Math.PI * R / Math.pow(2.0, lvl) / 2.56; 597 597 } 598 599 public static int scale2level(double scale) { 600 if (scale < 0) 601 throw new IllegalArgumentException(); 602 return (int) Math.floor(Math.log(2 * Math.PI * R / 2.56 / scale) / Math.log(2)); 603 } 598 604 599 605 @Override
Note:
See TracChangeset
for help on using the changeset viewer.