Changeset 11145 in josm for trunk/src


Ignore:
Timestamp:
2016-10-18T13:17:57+02:00 (7 years ago)
Author:
michael2402
Message:

See #13793: Fix dash offset sign.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/draw/MapViewPath.java

    r11144 r11145  
    203203    private class ClampingPathVisitor extends MapPath2D {
    204204        private final MapViewRectangle clip;
    205         private double strokeOffset;
     205        private double strokeProgress;
    206206        private final double strokeLength;
    207207        private MapViewPoint lastMoveTo;
     
    212212        ClampingPathVisitor(MapViewRectangle clip, double strokeOffset, double strokeLength) {
    213213            this.clip = clip;
    214             this.strokeOffset = strokeOffset;
     214            this.strokeProgress = Math.min(strokeLength - strokeOffset, 0);
    215215            this.strokeLength = strokeLength;
    216216        }
     
    269269                cursorIsActive = exit.equals(next);
    270270            }
    271             strokeOffset += cursor.distanceToInView(next);
     271            strokeProgress += cursor.distanceToInView(next);
    272272
    273273            cursor = next;
     
    282282
    283283            double distance = Math.sqrt(distanceSq);
    284             double offset = ((strokeOffset + distance)) % strokeLength;
     284            double offset = ((strokeProgress + distance)) % strokeLength;
    285285            if (offset < 0.01) {
    286286                return entry;
Note: See TracChangeset for help on using the changeset viewer.