Ignore:
Timestamp:
2008-08-28T22:07:04+02:00 (16 years ago)
Author:
stoecker
Message:

added multi-style mappaint support. Closes #1186

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ColorHelper.java

    r627 r885  
    1212                if (html.length() > 0 && html.charAt(0) == '#')
    1313                        html = html.substring(1);
    14                 if (html.length() != 6)
     14                else if (html.length() != 6 && html.length() != 8)
    1515                        return null;
    1616                try {
     
    1818                                        Integer.parseInt(html.substring(0,2),16),
    1919                                        Integer.parseInt(html.substring(2,4),16),
    20                                         Integer.parseInt(html.substring(4,6),16));
     20                                        Integer.parseInt(html.substring(4,6),16),
     21                                        (html.length() == 8 ? Integer.parseInt(html.substring(6,8),16) : 255));
    2122                } catch (NumberFormatException e) {
    2223                        return null;
Note: See TracChangeset for help on using the changeset viewer.