Changeset 31343 in osm


Ignore:
Timestamp:
2015-07-06T16:44:58+02:00 (9 years ago)
Author:
malcolmh
Message:

update jicons

Location:
applications/editors/josm/plugins/seachart
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/jicons/src/jicons/Jicons.java

    r31157 r31343  
    1717import java.io.OutputStreamWriter;
    1818import java.io.Writer;
     19import java.awt.Color;
    1920import java.awt.Dimension;
    2021import java.awt.Graphics2D;
     
    3334import s57.S57map;
    3435import s57.S57map.*;
     36import symbols.Symbols;
    3537import render.*;
    3638import render.Rules.RuleSet;
     
    200202                        return Math.min(w, h);
    201203                }
     204
     205                @Override
     206                public boolean clip() {
     207                        return false;
     208                }
     209
     210                @Override
     211                public Color background() {
     212                        return new Color(0, true);
     213                }
    202214        }
    203215}
  • applications/editors/josm/plugins/seachart/src/render/ChartContext.java

    r30894 r31343  
    1010package render;
    1111
     12import java.awt.Color;
    1213import java.awt.geom.Point2D;
    1314
     
    1718        Point2D getPoint(Snode coord);
    1819        double mile(Feature feature);
     20        boolean clip();
     21        Color background();
    1922}
  • applications/editors/josm/plugins/seachart/src/render/Renderer.java

    r31157 r31343  
    4343                sScale = symbolScale[zoom] * factor;
    4444                if (map != null) {
    45                         Point2D tl = context.getPoint(map.new Snode(map.bounds.maxlat, map.bounds.minlon));
    46                         Point2D br = context.getPoint(map.new Snode(map.bounds.minlat, map.bounds.maxlon));
    47                         g2.clip(new Rectangle2D.Double(tl.getX(), tl.getY(), (br.getX() - tl.getX()), (br.getY() - tl.getY())));
    48                         g2.setBackground(Symbols.Bwater);
     45                        if (context.clip()) {
     46                                Point2D tl = context.getPoint(map.new Snode(map.bounds.maxlat, map.bounds.minlon));
     47                                Point2D br = context.getPoint(map.new Snode(map.bounds.minlat, map.bounds.maxlon));
     48                                g2.clip(new Rectangle2D.Double(tl.getX(), tl.getY(), (br.getX() - tl.getX()), (br.getY() - tl.getY())));
     49                        }
     50                        g2.setBackground(context.background());
    4951                        g2.clearRect(rect.x, rect.y, rect.width, rect.height);
    5052                        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  • applications/editors/josm/plugins/seachart/src/render/Rules.java

    r31044 r31343  
    887887                                int i = 0;
    888888                                for (AttMap atts : objs.values()) {
    889                                         if (atts.get(Att.MARSYS) != null) sys = (MarSYS)atts.get(Att.MARSYS).val;
     889                                        if (atts.get(Att.MARSYS) != null) sys = (MarSYS)(atts.get(Att.MARSYS).val);
    890890                                        CatNMK cat = CatNMK.NMK_UNKN;
    891                                         if (atts.get(Att.CATNMK) != null) cat = (CatNMK)atts.get(Att.CATNMK).val;
     891                                        if (atts.get(Att.CATNMK) != null) cat = (CatNMK)(atts.get(Att.CATNMK).val);
    892892                                        Symbol sym = Notices.getNotice(cat, sys);
    893893                                        Handle h = Handle.CC;
  • applications/editors/josm/plugins/seachart/src/render/Signals.java

    r31063 r31343  
    283283
    284284        public static void lights(Feature feature) {
    285                 Enum<ColCOL> col = null;
     285/*              Enum<ColCOL> col = null;
    286286                Enum<ColCOL> tcol = null;
    287287                ObjTab lights = feature.objs.get(Obj.LIGHTS);
     
    412412                                        AttMap m0 = group.get(i);
    413413                                        AttMap m1 = group.get(i+1);
    414                                         if (((m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR) && ((int)m0.get(Att.VALNMR).val < (int)m1.get(Att.VALNMR).val)))
     414                                        if (((m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR) && ((int)(m0.get(Att.VALNMR).val) < (int)(m1.get(Att.VALNMR).val))))
    415415                                                        || (!m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR))) {
    416416                                                AttMap tmp = group.remove(i);
     
    421421                        }
    422422                }
    423         }
     423*/      }
    424424
    425425}
  • applications/editors/josm/plugins/seachart/src/s57/S57val.java

    r31063 r31343  
    3535       
    3636        public static class AttVal<V> {
    37 //              public Att att;
    3837                public Conv conv;
    3938                public V val;
    40 //              AttVal(Att a, Conv c, V v) {
    41 //                      att = a; conv = c; val = v;
    42 //              }
    4339                AttVal(Conv c, V v) {
    4440                        conv = c; val = v;
  • applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java

    r31044 r31343  
    3232import render.Rules.RuleSet;
    3333import s57.S57map.*;
     34import symbols.Symbols;
    3435
    3536public class ChartImage extends ImageryLayer implements ZoomChangeListener, ChartContext {
     
    9394                return 185000 / Main.map.mapView.getDist100Pixel();
    9495        }
     96       
     97        public boolean clip() {
     98                return true;
     99        }
     100       
     101        public Color background() {
     102                return (Symbols.Bwater);
     103        }
    95104}
  • applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java

    r31157 r31343  
    112112        protected void createChartLayer() {
    113113                rendering = new ChartImage(new ImageryInfo("SeaChart"));
    114                 rendering.setBackgroundLayer(true);
    115114                Main.main.addLayer(rendering);
    116115                MapView.addEditLayerChangeListener(this);
    117116                MapView.addLayerChangeListener(this);
    118117                editLayerChanged(Main.main.getEditLayer(), Main.main.getEditLayer());
     118                rendering.setBackgroundLayer(true);
    119119        }
    120120
Note: See TracChangeset for help on using the changeset viewer.