Changeset 5577 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
- Timestamp:
- 2012-11-12T21:38:11+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r4280 r5577 26 26 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.LinkSelector; 27 27 import org.openstreetmap.josm.tools.Pair; 28 import org.openstreetmap.josm.tools.Utils; 28 29 29 30 public class MapCSSParser { … … 553 554 f=ufloat() { return f; } 554 555 | 555 t=<HEXCOLOR> 556 { 557 String clr = t.image.substring(1); 558 if (clr.length() == 3) { 559 clr = new String(new char[] {clr.charAt(0),clr.charAt(0),clr.charAt(1),clr.charAt(1),clr.charAt(2),clr.charAt(2)}); 560 } 561 if (clr.length() != 6) 562 throw new AssertionError(); 563 return new Color(Integer.parseInt(clr, 16)); 564 } 556 t=<HEXCOLOR> { return Utils.hexToColor(t.image); } 565 557 } 566 558
Note:
See TracChangeset
for help on using the changeset viewer.