Ignore:
Timestamp:
2014-03-20T15:14:02+01:00 (12 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/render/Signals.java

    r30323 r30333  
    316316                                }
    317317                                if (atts.containsKey(Att.SECTR2)) {
    318                                         s1 = (Double) atts.get(Att.SECTR2).val;
     318                                        s2 = (Double) atts.get(Att.SECTR2).val;
    319319                                } else {
    320320                                        continue;
     
    326326                                        }
    327327                                }
    328                                 Renderer.lightSector(feature, lightColours.get(col1), lightColours.get(col2), radius, s1, s2, dir, "");
     328                                String str = "";
     329                                if (atts.containsKey(Att.LITCHR)) {
     330                                        str += lightCharacters.get(atts.get(Att.LITCHR).val);
     331                                }
     332                                if (atts.containsKey(Att.SIGGRP)) {
     333                                        str += "(" + atts.get(Att.SIGGRP).val + ")";
     334                                } else if (!str.isEmpty()) {
     335                                        str += ".";
     336                                }
     337                                if (atts.containsKey(Att.COLOUR)) {
     338                                        ArrayList<Enum<ColCOL>> cols = (ArrayList<Enum<ColCOL>>) atts.get(Att.COLOUR).val;
     339                                        str += lightLetters.get(cols.get(0));
     340                                        if (cols.size() > 1)
     341                                                str += lightLetters.get(cols.get(1));
     342                                }
     343                                if (dir && atts.containsKey(Att.ORIENT)) {
     344                                        double orient = (Double)atts.get(Att.ORIENT).val;
     345                                        str += " " + orient + "°";
     346                                        s1 = (orient - 4 + 360) % 360;
     347                                        s2 = (orient + 4) % 360;
     348                                        double n1 = 360;
     349                                        double n2 = 360;
     350                                        for (AttMap sect : objs.values()) {
     351                                                if (sect != atts) {
     352                                                       
     353                                                }
     354                                        }
     355                                }
     356                                Renderer.lightSector(feature, lightColours.get(col1), lightColours.get(col2), radius, s1, s2, dir, str);
    329357                        }
    330358                }
Note: See TracChangeset for help on using the changeset viewer.