Ignore:
Timestamp:
2013-10-13T19:17:33+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

    r30020 r30022  
    143143        }
    144144       
    145         public static void lineSymbols(Feature feature, Symbol prisymb, double space, Symbol secsymb, int ratio) {
     145        public static void lineSymbols(Feature feature, Symbol prisymb, double space, Symbol secsymb, int ratio, Color col) {
    146146                Area area;
    147147                switch (feature.flag) {
     
    207207                                                        }
    208208                                                        if (!gap) {
    209                                                                 Symbols.drawSymbol(g2, symbol, sScale, curr.getX(), curr.getY(), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.atan2((succ.getY() - curr.getY()), (succ.getX() - curr.getX())) + Math.toRadians(90))), null);
     209                                                                Symbols.drawSymbol(g2, symbol, sScale, curr.getX(), curr.getY(),
     210                                                                                new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.atan2((succ.getY() - curr.getY()), (succ.getX() - curr.getX())) + Math.toRadians(90))),
     211                                                                                new Scheme(col));
    210212                                                        }
    211213                                                        if (space > 0)
  • applications/editors/josm/plugins/smed2/src/seamap/Rules.java

    r30020 r30022  
    140140                case RESARE:
    141141                        if (zoom >= 12) {
    142                                 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0);
     142                                Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0, new Color(0x80c480));
    143143//                              if ((CatREA)Renderer.getAttVal(feature, feature.type, 0, Att.CATREA) == CatREA.REA_NWAK)
    144144//                                      Renderer.symbol(feature, Areas.NoWake, Obj.RESARE, null);
     
    199199                        if (zoom >= 12) {
    200200                                Renderer.symbol(feature, Areas.Plane, Obj.SPLARE, null, null);
    201                                 Renderer.lineSymbols(feature, Areas.Restricted, 0.5, Areas.LinePlane, 10);
     201                                Renderer.lineSymbols(feature, Areas.Restricted, 0.5, Areas.LinePlane, 10, new Color(0x80c480));
    202202                        }
    203203                        if ((zoom >= 15) && (name != null))
     
    268268                if (zoom >= 14) {
    269269                        if (feature.type == Obj.CBLSUB) {
    270                                 Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0);
     270                                Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0, new Color(0x80c480));
    271271                        } else if (feature.type == Obj.CBLOHD) {
    272272
     
    311311                case ACHARE:
    312312                        if (zoom >= 12) {
    313                                 if (feature.flag != Fflag.LINE)
    314                                         Renderer.symbol(feature, Harbours.Anchorage, null, null, null);
    315                                 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10);
     313                                if (feature.flag != Fflag.AREA) {
     314                                        Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Color.black));
     315                                } else {
     316                                        Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff)));
     317                                        Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, new Color(0xc480ff));
     318                                }
    316319                                if ((zoom >= 15) && ((name) != null)) {
    317                                         Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), new Color(0x80c480ff), 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)));
    318321                                }
    319322                        }
     
    705708                if (zoom >= 14) {
    706709                        if (feature.type == Obj.PIPSOL) {
    707                                 Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, 0);
     710                                Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, 0, new Color(0x80c480));
    708711                        } else if (feature.type == Obj.PIPOHD) {
    709712
     
    748751                case TSSRON:
    749752                        if (zoom <= 15)
    750                                 Renderer.lineVector(feature, new LineStyle(null, 0, null, new Color(0x80c480ff, true)));
     753                                Renderer.lineVector(feature, new LineStyle(null, 0, null, new Color(0x80c48080, true)));
    751754                        else
    752                                 Renderer.lineVector(feature, new LineStyle(new Color(0x80c480ff, true), 20, null, null));
     755                                Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null));
    753756                        AttItem name = feature.atts.get(Att.OBJNAM);
    754757                        if ((zoom >= 10) && (name != null))
    755                                 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), new Color(0x80c480ff), null);
     758                                Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), new Color(0x80c48080), null);
    756759                        break;
    757760                case TSELNE:
    758                         Renderer.lineVector(feature, new LineStyle(new Color(0x80c480ff, true), 20, null, null));
     761                        Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null));
    759762                        break;
    760763                case TSSLPT:
    761                         Renderer.lineSymbols(feature, Areas.LaneArrow, 0.5, null, 0);
     764                        Renderer.lineSymbols(feature, Areas.LaneArrow, 0.5, null, 0, new Color(0x80c48080, true));
    762765                        break;
    763766                case TSSBND:
    764                         Renderer.lineVector(feature, new LineStyle(new Color(0x80c480ff, true), 20, new float[] { 40, 40 }, null));
     767                        Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, new float[] { 40, 40 }, null));
    765768                        break;
    766769                case ISTZNE:
    767                         Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0);
     770                        Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0, new Color(0x80c48080, true));
    768771                        break;
    769772                }
Note: See TracChangeset for help on using the changeset viewer.