Ignore:
Timestamp:
2016-02-27T16:14:25+01:00 (10 years ago)
Author:
malcolmh
Message:

[seachart] update

File:
1 edited

Legend:

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

    r32082 r32084  
    323323                }
    324324                Renderer.symbol(feature, Beacons.LightFlare, new Scheme(LightColours.get(col)), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120))));
    325                 if (Renderer.zoom >= 15) {
    326325                        String str = "";
    327326                        if (lights.get(1) != null) {
     
    375374                                                        str += LightLetters.get(cols.get(1));
    376375                                        }
     376                                        if (atts.containsKey(Att.SIGPER)) {
     377                                                str += "." + df.format(atts.get(Att.SIGPER).val) + "s";
     378                                        }
    377379                                        if (dir && atts.containsKey(Att.ORIENT)) {
    378380                                                double orient = (Double) atts.get(Att.ORIENT).val;
     
    390392                                        Renderer.lightSector(feature, LightColours.get(col1), LightColours.get(col2), radius, s1, s2, dir, (Renderer.zoom >= 15) ? str : "");
    391393                                }
     394                        if (Renderer.zoom >= 15) {
    392395                                class LitSect {
    393396                                        boolean dir;
     
    404407                                for (AttMap atts : lights.values()) {
    405408                                        LitSect sect = new LitSect();
    406                                         litatts.add(sect);
    407409                                        sect.dir = (atts.containsKey(Att.CATLIT)) && (atts.get(Att.CATLIT).val == CatLIT.LIT_DIR);
    408410                                        sect.chr = atts.containsKey(Att.LITCHR) ? ((ArrayList<LitCHR>) atts.get(Att.LITCHR).val).get(0) : LitCHR.CHR_UNKN;
     
    433435                                        sect.col = cols.size() > 0 ? cols.get(0) : ColCOL.COL_UNK;
    434436                                        sect.alt = cols.size() > 1 ? cols.get(1) : ColCOL.COL_UNK;
     437                                        if ((sect.chr != LitCHR.CHR_UNKN) && (sect.col != null))
     438                                                litatts.add(sect);
    435439                                }
    436440                                ArrayList<ArrayList<LitSect>> groupings = new ArrayList<>();
     
    507511                                                str += LightLetters.get(cr.col);
    508512                                        }
     513                                        if ((tmp.per > 0) || (tmp.hgt > 0) || (colrng.get(0).rng > 0))
     514                                                str += ".";
    509515                                        if (tmp.per > 0)
    510516                                                str += df.format(tmp.per) + "s";
     
    517523                                        str = "";
    518524                                }
    519                         } else {
     525                        }
     526                } else {
     527                        if (Renderer.zoom >= 15) {
    520528                                AttMap atts = lights.get(0);
    521529                                ArrayList<CatLIT> cats = new ArrayList<>();
Note: See TracChangeset for help on using the changeset viewer.