Ignore:
Timestamp:
2013-10-13T23:49:37+02:00 (12 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed2/src/seamap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/seamap/Renderer.java

    r30022 r30023  
    304304                label.add(new Instr(Prim.TEXT, new Caption(str, font, colour, (delta == null) ? new Delta(Handle.CC, null) : delta)));
    305305                Point2D point = helper.getPoint(feature.centre);
    306                 Symbols.drawSymbol(g2, label, tScale, point.getX(), point.getY(), null, null);
     306                Symbols.drawSymbol(g2, label, sScale, point.getX(), point.getY(), null, null);
    307307        }
    308308
  • applications/editors/josm/plugins/smed2/src/seamap/Rules.java

    r30022 r30023  
    318318                                }
    319319                                if ((zoom >= 15) && ((name) != null)) {
    320                                         Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), new Color(0xc480ff), new Delta(Handle.BC, AffineTransform.getTranslateInstance(160, 0)));
     320                                        Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), new Color(0xc480ff), new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));
    321321                                }
     322                                ArrayList<StsSTS> sts = (ArrayList<StsSTS>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.STATUS);
     323                                if ((zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) {
     324                                        Renderer.labelText(feature, "Reserved", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));
     325                                }
     326                        }
     327                        ArrayList<CatACH> cats = (ArrayList<CatACH>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.CATACH);
     328                        int dy = (cats.size() - 1) * -30;
     329                        for (CatACH cat : cats) {
     330                                switch (cat) {
     331                                case ACH_DEEP:
     332                                        Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
     333                                        dy += 60;
     334                                        break;
     335                                case ACH_TANK:
     336                                        Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
     337                                        dy += 60;
     338                                        break;
     339                                case ACH_H24P:
     340                                        Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
     341                                        dy += 60;
     342                                        break;
     343                                case ACH_EXPL:
     344                                        Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
     345                                        dy += 60;
     346                                        break;
     347                                case ACH_QUAR:
     348                                        Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
     349                                        dy += 60;
     350                                        break;
     351                                case ACH_SEAP:
     352                                        Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
     353                                        dy += 60;
     354                                        break;
     355                                }
    322356                        }
    323357                        break;
     
    325359        }
    326360/*
    327          *   if ((zoom >= 12) && is_type("anchorage")) {
    328     symbol("anchorage");
    329     if ((zoom >= 15) && (has_item_attribute("name")))
    330       text(item_attribute("name"), "font-family:Arial; font-weight:bold; font-size:80; text-anchor:middle", 0, -90);
    331     if ((zoom >= 12) && (is_area)) line_symbols("restricted_line", 0.5, "line_anchor", 10);
    332   }
    333361  if ((zoom >= 16) && is_type("anchor_berth")) symbol("anchor_berth");
    334362  if ((zoom >= 12) && is_type("harbour")) {
Note: See TracChangeset for help on using the changeset viewer.