Ignore:
Timestamp:
24.01.2010 17:55:56 (2 years ago)
Author:
bastiK
Message:

Reverse Arrows for 'oneway=-1' and similar (see #2387).
More efficient calculation of arrow geometry.
Test file for Arrow direction added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r2675 r2890  
    146146        boolean showDirection = selected || ((!paintSettings.isUseRealWidth()) && (paintSettings.isShowDirectionArrow() 
    147147                && (!paintSettings.isShowRelevantDirectionsOnly() || w.hasDirectionKeys()))); 
     148        boolean reversedDirection = w.reversedDirection(); 
    148149        /* head only takes over control if the option is true, 
    149150        the direction should be shown at all and not only because it's selected */ 
     
    189190                if(!s.over) { 
    190191                    painter.drawWay(w, s.color != null && selected ? myColor: s.color, s.getWidth(myWidth), 
    191                             s.getDashed(), s.dashedColor, false, false); 
     192                            s.getDashed(), s.dashedColor, false, false, false); 
    192193                } 
    193194            } 
     
    195196 
    196197        /* draw the way */ 
    197         painter.drawWay(w, myColor, myWidth, dashed, dashedColor, showDirection, showOnlyHeadArrowOnly); 
     198        painter.drawWay(w, myColor, myWidth, dashed, dashedColor, showDirection, selected ? false : reversedDirection, showOnlyHeadArrowOnly); 
    198199 
    199200        /* draw overlays above the way */ 
     
    202203                if(s.over) { 
    203204                    painter.drawWay(w, s.color != null && selected ? myColor : s.color, s.getWidth(myWidth), 
    204                             s.getDashed(), s.dashedColor, false, false); 
     205                            s.getDashed(), s.dashedColor, false, false, false); 
    205206                } 
    206207            } 
Note: See TracChangeset for help on using the changeset viewer.