Ignore:
Timestamp:
2009-06-06T13:33:27+02:00 (17 years ago)
Author:
stoecker
Message:

fix #2667 - patch by Daeron - Add support for dash patterns in mappaint

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

Legend:

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

    r1629 r1635  
    105105                try
    106106                {
    107                     line.dashed=Integer.parseInt(atts.getValue(count));
     107                    String[] parts = atts.getValue(count).split(",");
     108                    line.dashed = new float[parts.length];
     109                    for (int i = 0; i < parts.length; i++) {
     110                        line.dashed[i] = (float)(Integer.parseInt(parts[i]));
     111                    }
    108112                } catch (NumberFormatException nfe) {
    109113                    boolean dashed=Boolean.parseBoolean(atts.getValue(count));
    110114                    if(dashed) {
    111                         line.dashed = 9;
     115                        line.dashed = new float[]{9};
    112116                    }
    113117                }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r1340 r1635  
    99    public int realWidth; //the real width of this line in meter
    1010    public Color color;
    11     public int dashed;
     11    public float[] dashed;
    1212    public Color dashedColor;
    1313
     
    5757        width = 1;
    5858        realWidth = 0;
    59         dashed = 0;
     59        dashed = new float[0];
    6060        dashedColor = null;
    6161        priority = 0;
Note: See TracChangeset for help on using the changeset viewer.