Changeset 3841 in josm
- Timestamp:
- 2011-02-01T19:50:51+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
r3836 r3841 68 68 private static final double sinPHI = Math.sin(PHI); 69 69 70 public MapPainter(MapPaintSettings settings, Graphics2D g, 71 boolean inactive, NavigatableComponent nc, boolean virtual,72 double circum, boolean leftHandTraffic)70 public MapPainter(MapPaintSettings settings, Graphics2D g, 71 boolean inactive, NavigatableComponent nc, boolean virtual, 72 double circum, boolean leftHandTraffic) 73 73 { 74 74 this.g = g; … … 162 162 g.setColor(inactive ? inactiveColor : color); 163 163 if (useStrokes) { 164 if (dashed == null ||dashed.length > 0) {164 if (dashed != null && dashed.length > 0) { 165 165 g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0, dashed,0)); 166 166 } else { … … 173 173 if(!inactive && useStrokes && dashedColor != null) { 174 174 g.setColor(dashedColor); 175 if (dashed == null ||dashed.length > 0) {175 if (dashed != null && dashed.length > 0) { 176 176 float[] dashedOffset = new float[dashed.length]; 177 177 System.arraycopy(dashed, 1, dashedOffset, 0, dashed.length - 1); … … 285 285 g.fillPolygon(polygon); 286 286 } 287 287 288 288 289 289 if (name != null) { … … 384 384 385 385 if("from".equals(m.getRole())) { 386 if(fromWay == null) 386 if(fromWay == null) { 387 387 fromWay = w; 388 } 388 389 } else if("to".equals(m.getRole())) { 389 if(toWay == null) 390 if(toWay == null) { 390 391 toWay = w; 392 } 391 393 } else if("via".equals(m.getRole())) { 392 if(via == null) 394 if(via == null) { 393 395 via = w; 396 } 394 397 } 395 398 } … … 397 400 { 398 401 Node n = m.getNode(); 399 if("via".equals(m.getRole()) && via == null) 402 if("via".equals(m.getRole()) && via == null) { 400 403 via = n; 404 } 401 405 } 402 406 } … … 410 414 { 411 415 viaNode = (Node) via; 412 if(!fromWay.isFirstLastNode(viaNode)) {416 if(!fromWay.isFirstLastNode(viaNode)) 413 417 return; 414 }415 418 } 416 419 else … … 441 444 } else if (!onewayvia && fromWay.isFirstLastNode(lastNode)) { 442 445 viaNode = lastNode; 443 } else {446 } else 444 447 return; 445 }446 448 } 447 449
Note:
See TracChangeset
for help on using the changeset viewer.