Ignore:
Timestamp:
2016-10-18T13:04:35+02:00 (8 years ago)
Author:
michael2402
Message:

Fix #13793: Clip paths in a way that let's the dashes stay in place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r11100 r11144  
    451451    }
    452452
    453     private void displaySegments(Path2D path, Path2D orientationArrows, Path2D onewayArrows, Path2D onewayArrowsCasing,
     453    private void displaySegments(MapViewPath path, Path2D orientationArrows, Path2D onewayArrows, Path2D onewayArrowsCasing,
    454454            Color color, BasicStroke line, BasicStroke dashes, Color dashedColor) {
    455455        g.setColor(isInactiveMode ? inactiveColor : color);
     
    457457            g.setStroke(line);
    458458        }
    459         g.draw(path);
     459        g.draw(path.computeClippedLine(g.getStroke()));
    460460
    461461        if (!isInactiveMode && useStrokes && dashes != null) {
    462462            g.setColor(dashedColor);
    463463            g.setStroke(dashes);
    464             g.draw(path);
     464            g.draw(path.computeClippedLine(dashes));
    465465        }
    466466
     
    10301030     * @param line line style
    10311031     */
    1032     private void drawPathHighlight(Path2D path, BasicStroke line) {
     1032    private void drawPathHighlight(MapViewPath path, BasicStroke line) {
    10331033        if (path == null)
    10341034            return;
Note: See TracChangeset for help on using the changeset viewer.