Changeset 12455 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2017-07-07T21:27:45+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/draw/MapViewPath.java
r12450 r12455 254 254 length += f; 255 255 } 256 return visitClippedLine( ((BasicStroke) stroke).getDashPhase(),length, consumer);256 return visitClippedLine(length, consumer); 257 257 } else { 258 return visitClippedLine(0, 0,consumer);258 return visitClippedLine(0, consumer); 259 259 } 260 260 } … … 263 263 * Visits all straight segments of this path. The segments are clamped to the view. 264 264 * If they are clamped, the start points are aligned with the pattern. 265 * @param strokeOffset The initial offset of the pattern 266 * @param strokeLength The dash pattern length. 0 to use no pattern. 265 * @param strokeLength The dash pattern length. 0 to use no pattern. Only segments of this length will be removed from the line. 267 266 * @param consumer The consumer to call for each segment 268 267 * @return false if visiting the path failed because there e.g. were non-straight segments. 269 268 * @since 11147 270 269 */ 271 public boolean visitClippedLine(double stroke Offset, double strokeLength, PathSegmentConsumer consumer) {272 return new ClampingPathVisitor(state.getViewClipRectangle(), stroke Offset, strokeLength, consumer)270 public boolean visitClippedLine(double strokeLength, PathSegmentConsumer consumer) { 271 return new ClampingPathVisitor(state.getViewClipRectangle(), strokeLength, consumer) 273 272 .visit(this); 274 273 } … … 400 399 * Create a new {@link ClampingPathVisitor} 401 400 * @param clip View clip rectangle 402 * @param strokeOffset Initial stroke offset403 401 * @param strokeLength Total length of a stroke sequence 404 402 * @param consumer The consumer to notify of the path segments. 405 403 */ 406 ClampingPathVisitor(MapViewRectangle clip, double stroke Offset, double strokeLength, PathSegmentConsumer consumer) {404 ClampingPathVisitor(MapViewRectangle clip, double strokeLength, PathSegmentConsumer consumer) { 407 405 this.clip = clip; 408 this.strokeProgress = Math.min(strokeLength - strokeOffset, 0);409 406 this.strokeLength = strokeLength; 410 407 this.consumer = consumer;
Note:
See TracChangeset
for help on using the changeset viewer.