Changeset 12455 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor
- Timestamp:
- 2017-07-07T21:27:45+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r12450 r12455 655 655 } 656 656 657 double startOffset = phase % repeat; 658 if (startOffset < 0) { 659 startOffset += repeat; 660 } 657 double startOffset = computeStartOffset(phase, repeat); 661 658 662 659 BufferedImage image = pattern.getImage(disabled); 663 660 664 path.visitClippedLine( startOffset,repeat, (inLineOffset, start, end, startIsOldEnd) -> {661 path.visitClippedLine(repeat, (inLineOffset, start, end, startIsOldEnd) -> { 665 662 final double segmentLength = start.distanceToInView(end); 666 663 if (segmentLength < 0.1) { … … 679 676 680 677 // The start of the next image 681 double imageStart = -( inLineOffset% repeat);678 double imageStart = -((inLineOffset + startOffset) % repeat); 682 679 683 680 while (imageStart < segmentLength) { … … 691 688 g.setTransform(saveTransform); 692 689 }); 690 } 691 692 private static double computeStartOffset(double phase, final double repeat) { 693 double startOffset = phase % repeat; 694 if (startOffset < 0) { 695 startOffset += repeat; 696 } 697 return startOffset; 693 698 } 694 699 … … 1291 1296 double interval = 60; 1292 1297 1293 path.visitClippedLine( 0,60, (inLineOffset, start, end, startIsOldEnd) -> {1298 path.visitClippedLine(60, (inLineOffset, start, end, startIsOldEnd) -> { 1294 1299 double segmentLength = start.distanceToInView(end); 1295 1300 if (segmentLength > 0.001) {
Note:
See TracChangeset
for help on using the changeset viewer.