Changeset 4055 in josm for trunk


Ignore:
Timestamp:
2011-04-22T23:58:10+02:00 (14 years ago)
Author:
bastiK
Message:

#6246 - area edges painted above highway

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint
Files:
2 edited

Legend:

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

    r4006 r4055  
    7373            if (!hasProperLineStyle) {
    7474                AreaElemStyle area = Utils.find(p.a, AreaElemStyle.class);
    75                 LineElemStyle line = (area == null ? LineElemStyle.UNTAGGED_WAY : LineElemStyle.createSimpleLineStyle(area.color));
     75                LineElemStyle line = (area == null ? LineElemStyle.UNTAGGED_WAY : LineElemStyle.createSimpleLineStyle(area.color, true));
    7676                p.a = new StyleList(p.a, line);
    7777            }
     
    152152                }
    153153                if (!hasLineStyle) {
    154                     p.a = new StyleList(p.a, LineElemStyle.createSimpleLineStyle(wayColor));
     154                    p.a = new StyleList(p.a, LineElemStyle.createSimpleLineStyle(wayColor, true));
    155155                }
    156156                return p;
     
    183183                            }
    184184                        }
    185                         p.a = new StyleList(p.a, LineElemStyle.createSimpleLineStyle(mpColor));
     185                        p.a = new StyleList(p.a, LineElemStyle.createSimpleLineStyle(mpColor, true));
    186186                    }
    187187                    return p;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r4006 r4055  
    1818public class LineElemStyle extends ElemStyle {
    1919
    20     public static LineElemStyle createSimpleLineStyle(Color color) {
     20    public static LineElemStyle createSimpleLineStyle(Color color, boolean isAreaEdge) {
    2121        MultiCascade mc = new MultiCascade();
    2222        Cascade c = mc.getOrCreateCascade("default");
    2323        c.put("width", Keyword.DEFAULT);
    2424        c.put("color", color != null ? color : PaintColors.UNTAGGED.get());
     25        if (isAreaEdge) {
     26            c.put("z-index", -3f);
     27        }
    2528        return createLine(new Environment(null, mc, "default", null));
    2629    }
    27     public static final LineElemStyle UNTAGGED_WAY = createSimpleLineStyle(null);
     30    public static final LineElemStyle UNTAGGED_WAY = createSimpleLineStyle(null, false);
    2831
    2932    private BasicStroke line;
Note: See TracChangeset for help on using the changeset viewer.