Ignore:
Timestamp:
2013-10-20T16:50:35+02:00 (12 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

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

    r30027 r30028  
    3131        static SeaMap map;
    3232        static int zoom;
     33       
     34        public static final Color Yland = new Color(0x50b0ff);
     35        public static final Color Mline = new Color(0xc480ff);
     36        public static final Color Msymb = new Color(0xa30075);
    3337       
    3438        public static void rules (SeaMap m, int z) {
     
    121125                        if (feature.area > 2.0) {
    122126                                if (zoom < 16)
    123                                         Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 8, new float[] { 50, 50 }, new Color(0x40ffffff, true)));
     127                                        Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 }, new Color(0x40ffffff, true)));
    124128                                else
    125                                         Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 8, new float[] { 50, 50 }, null));
     129                                        Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 }, null));
    126130                        } else {
    127131                                if (zoom >= 14)
     
    276280       
    277281        private static void cables(Feature feature) {
    278                 if (zoom >= 14) {
     282                if ((zoom >= 16) && (feature.length < 2)) {
    279283                        if (feature.type == Obj.CBLSUB) {
    280284                                Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0, new Color(0x80c480));
     
    327331                case ACHBRT:
    328332                        if (zoom >= 14) {
    329                                 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff)));
    330                                 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 30), LabelStyle.RRCT, new Color(0xc480ff), Color.white, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 0)));
     333                                Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Mline));
     334                                Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 30), LabelStyle.RRCT, Mline, Color.white, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 0)));
    331335                        }
    332336                        double radius = (Double)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS);
    333337                        if (radius != 0) {
    334338                                UniHLU units = (UniHLU)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS);
    335                                 Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 10, 10 }, null), radius, units);
     339                                Renderer.lineCircle (feature, new LineStyle(Mline, 4, new float[] { 10, 10 }, null), radius, units);
    336340                        }
    337341                        break;
     
    341345                                        Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Color.black));
    342346                                } else {
    343                                         Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff)));
    344                                         Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, new Color(0xc480ff));
     347                                        Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Mline));
     348                                        Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, Mline);
    345349                                }
    346350                                if ((zoom >= 15) && ((name) != null)) {
    347                                         Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));
     351                                        Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), LabelStyle.NONE, Mline, null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));
    348352                                }
    349353                                ArrayList<StsSTS> sts = (ArrayList<StsSTS>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.STATUS);
    350354                                if ((zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) {
    351                                         Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));
     355                                        Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));
    352356                                }
    353357                        }
     
    357361                                switch (cat) {
    358362                                case ACH_DEEP:
    359                                         Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
     363                                        Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
    360364                                        dy += 60;
    361365                                        break;
    362366                                case ACH_TANK:
    363                                         Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
     367                                        Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
    364368                                        dy += 60;
    365369                                        break;
    366370                                case ACH_H24P:
    367                                         Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
     371                                        Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
    368372                                        dy += 60;
    369373                                        break;
    370374                                case ACH_EXPL:
    371                                         Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
     375                                        Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(Mline));
    372376                                        dy += 60;
    373377                                        break;
    374378                                case ACH_QUAR:
    375                                         Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
     379                                        Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(Mline));
    376380                                        dy += 60;
    377381                                        break;
    378382                                case ACH_SEAP:
    379                                         Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
     383                                        Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(Mline));
    380384                                        dy += 60;
    381385                                        break;
     
    385389                case BERTHS:
    386390                        if (zoom >= 14) {
    387                                 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, new Color(0xc480ff), Color.white, null);
     391                                Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, Mline, Color.white, null);
    388392                        }
    389393                        break;
Note: See TracChangeset for help on using the changeset viewer.