Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java	(revision 3858)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java	(revision 3859)
@@ -100,5 +100,5 @@
     }
 
-    public void drawWay(Way way, Color color, float width, float dashed[], Color dashedColor, boolean showDirection,
+    public void drawWay(Way way, Color color, float width, float dashed[], float dashesOffset, Color dashedColor, boolean showDirection,
             boolean reversedDirection, boolean showHeadArrowOnly) {
 
@@ -156,12 +156,12 @@
             lastPoint = p;
         }
-        displaySegments(path, arrows, color, width, dashed, dashedColor);
-    }
-
-    private void displaySegments(GeneralPath path, GeneralPath arrows, Color color, float width, float dashed[], Color dashedColor) {
+        displaySegments(path, arrows, color, width, dashed, dashesOffset, dashedColor);
+    }
+
+    private void displaySegments(GeneralPath path, GeneralPath arrows, Color color, float width, float dashed[], float dashesOffset, Color dashedColor) {
         g.setColor(inactive ? inactiveColor : color);
         if (useStrokes) {
             if (dashed != null && dashed.length > 0) {
-                g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0, dashed,0));
+                g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,dashed,dashesOffset));
             } else {
                 g.setStroke(new BasicStroke(width,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
@@ -175,8 +175,8 @@
             if (dashed != null && dashed.length > 0) {
                 float[] dashedOffset = new float[dashed.length];
-                System.arraycopy(dashed, 1, dashedOffset, 0, dashed.length - 1);
-                dashedOffset[dashed.length-1] = dashed[0];
-                float offset = dashedOffset[0];
-                g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,dashedOffset,offset));
+                System.arraycopy(dashed, 0, dashedOffset, 1, dashed.length - 1);
+                dashedOffset[0] = dashed[dashed.length-1];
+                float offset = dashedOffset[0] + dashesOffset;
+                g.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,dashedOffset, offset));
             } else {
                 g.setStroke(new BasicStroke(width,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 3858)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 3859)
@@ -65,5 +65,5 @@
     @Override
     public String toString() {
-        return "AreaElemStyle{" + super.toString() + "color=" + color + '}';
+        return "AreaElemStyle{" + super.toString() + "color=" + Utils.toString(color) + '}';
     }
 }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 3858)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 3859)
@@ -16,5 +16,5 @@
 
     public static LineElemStyle createSimpleLineStyle(Color color) {
-        return new LineElemStyle(Cascade.EMPTY_CASCADE, -1f, 0f, color != null ? color : PaintColors.UNTAGGED.get(), null, null);
+        return new LineElemStyle(Cascade.EMPTY_CASCADE, -1f, 0f, color != null ? color : PaintColors.UNTAGGED.get(), null, 0f, null);
     }
     public static final LineElemStyle UNTAGGED_WAY = createSimpleLineStyle(null);
@@ -24,7 +24,8 @@
     public Color color;
     private float[] dashed;
+    private float dashesOffset;
     public Color dashedColor;
 
-    protected LineElemStyle(Cascade c, float width, float realWidth, Color color, float[] dashed, Color dashedColor) {
+    protected LineElemStyle(Cascade c, float width, float realWidth, Color color, float[] dashed, float dashesOffset, Color dashedColor) {
         super(c);
         setWidth(width);
@@ -32,4 +33,5 @@
         this.color = color;
         this.dashed = dashed;
+        this.dashesOffset = dashesOffset;
         this.dashedColor = dashedColor;
     }
@@ -84,7 +86,16 @@
             }
         }
+        float dashesOffset = c.get(prefix + "dashes-offset", 0f, Float.class);
         Color dashesBackground = c.get(prefix + "dashes-background-color", null, Color.class);
-
-        return new LineElemStyle(c, width, realWidth, color, dashes, dashesBackground);
+        if (dashesBackground != null) {
+            pAlpha = color_float2int(c.get(prefix + "dashes-background-opacity", null, Float.class));
+            if (pAlpha != null) {
+                alpha = pAlpha;
+            }
+            dashesBackground = new Color(dashesBackground.getRed(), dashesBackground.getGreen(),
+                    dashesBackground.getBlue(), alpha);
+        }
+
+        return new LineElemStyle(c, width, realWidth, color, dashes, dashesOffset, dashesBackground);
     }
 
@@ -140,6 +151,7 @@
         }
 
-        painter.drawWay(w, markColor != null ? markColor : color, myWidth, dashed, myDashedColor, showDirection,
-                    selected ? false : reversedDirection, showOnlyHeadArrowOnly);
+        painter.drawWay(w, markColor != null ? markColor : color, myWidth, dashed, 
+                dashesOffset, myDashedColor, showDirection,
+                selected ? false : reversedDirection, showOnlyHeadArrowOnly);
 
         if(paintSettings.isShowOrderNumber()) {
@@ -177,4 +189,5 @@
                 Utils.equal(color, other.color) &&
                 Arrays.equals(dashed, other.dashed) &&
+                dashesOffset == other.dashesOffset &&
                 Utils.equal(dashedColor, other.dashedColor);
     }
@@ -187,4 +200,5 @@
         hash = 29 * hash + color.hashCode();
         hash = 29 * hash + Arrays.hashCode(dashed);
+        hash = 29 * hash + Float.floatToIntBits(dashesOffset);
         hash = 29 * hash + (dashedColor != null ? dashedColor.hashCode() : 0);
         return hash;
@@ -193,5 +207,9 @@
     @Override
     public String toString() {
-        return "LineElemStyle{" + super.toString() + "width=" + width + " realWidth=" + realWidth + " color=" + color + " dashed=" + Arrays.toString(dashed) + " dashedColor=" + dashedColor + '}';
+        return "LineElemStyle{" + super.toString() + "width=" + width + 
+                " realWidth=" + realWidth + " color=" + Utils.toString(color) +
+                " dashed=" + Arrays.toString(dashed) +
+                (dashesOffset == 0f ? "" : " dashesOffses=" + dashesOffset) +
+                " dashedColor=" + Utils.toString(dashedColor) + '}';
     }
 }
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 3858)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 3859)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.tools;
 
+import java.awt.Color;
 import java.util.Collection;
 
@@ -110,3 +111,16 @@
         return s.toString();
     }
+
+    /**
+     * convert Color to String
+     * (Color.toString() omits alpha value)
+     */
+    public static String toString(Color c) {
+        if (c == null)
+            return "null";
+        if (c.getAlpha() == 255)
+            return String.format("#%06x", c.getRGB() & 0x00ffffff);
+        else
+            return String.format("#%06x(alpha=%d)", c.getRGB() & 0x00ffffff, c.getAlpha());
+    }
 }
