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

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

File:
1 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                }
Note: See TracChangeset for help on using the changeset viewer.