Changeset 33195 in osm for applications


Ignore:
Timestamp:
2017-03-24T10:46:53+01:00 (8 years ago)
Author:
malcolmh
Message:

[Seachart] Publish new release

Location:
applications/editors/josm/plugins/seachart/src
Files:
3 edited

Legend:

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

    r32909 r33195  
    7777            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
    7878            g2.setStroke(new BasicStroke(0, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
    79             Rules.rules();
     79            do {} while (!Rules.rules());
    8080        }
    8181    }
  • applications/editors/josm/plugins/seachart/src/render/Rules.java

    r33193 r33195  
    77import java.text.DecimalFormat;
    88import java.util.ArrayList;
     9import java.util.ConcurrentModificationException;
    910import java.util.EnumMap;
    1011import java.util.HashMap;
     
    251252    }
    252253
    253     public static void rules() {
     254    public static boolean rules() {
    254255        try {
    255256        if ((Renderer.context.ruleset() == RuleSet.ALL) || (Renderer.context.ruleset() == RuleSet.BASE)) {
     
    347348            if (testObject(Obj.BCNSPP)) for (Feature f : objects) if (testFeature(f)) beacons();
    348349        }
     350        } catch (ConcurrentModificationException e) {
     351                return false;
    349352        } catch (Exception e) {
    350                 return; // Just skip this pass
     353                return true;
    351354        }
     355        return true;
    352356    }
    353357
  • applications/editors/josm/plugins/seachart/src/symbols/Beacons.java

    r32907 r33195  
    7575    }
    7676
     77    public static final Symbol Lattice = new Symbol();
     78    static {
     79      Symbol colours = new Symbol();
     80      Path2D.Double p = new Path2D.Double(); p.moveTo(-20.0, 0.0); p.lineTo(-15.0, -70.0); p.lineTo(15.0, -70.0); p.lineTo(20.0, 0.0); p.lineTo(10.0, 0.0); p.curveTo(10.0, -13.3, -10.0, -13.3, -10.0, 0.0); p.closePath();
     81      colours.add(new Instr(Form.P1, p));
     82      p = new Path2D.Double(); p.moveTo(-20.0, 0.0); p.lineTo(-17.5, -35.0); p.lineTo(17.5, -35.0); p.lineTo(20.0, 0.0); p.lineTo(10.0, 0.0); p.curveTo(10.0, -13.3, -10.0, -13.3, -10.0, 0.0); p.closePath();
     83      colours.add(new Instr(Form.H2, p));
     84      p = new Path2D.Double(); p.moveTo(-18.3, -23.3); p.lineTo(-16.7, -46.7); p.lineTo(16.7, -46.7); p.lineTo(18.3, -23.3); p.closePath();
     85      colours.add(new Instr(Form.H3, p));
     86      p = new Path2D.Double(); p.moveTo(-17.5, -35.0); p.lineTo(-16.25, -52.5); p.lineTo(16.25, -52.5); p.lineTo(17.5, -35.0); p.closePath();
     87      colours.add(new Instr(Form.H4, p));
     88      p = new Path2D.Double(); p.moveTo(-18.75, -17.5); p.lineTo(-17.5, -35.0); p.lineTo(17.5, -35.0); p.lineTo(18.75, -17.5); p.closePath();
     89      colours.add(new Instr(Form.H5, p));
     90      p = new Path2D.Double(); p.moveTo(0.0, -70.0); p.lineTo(15.0, -70.0); p.lineTo(20.0, 0.0); p.lineTo(10.0, 0.0); p.quadTo(10.0, -10.0, 0.0, -10.0); p.closePath();
     91      colours.add(new Instr(Form.V2, p));
     92      Lattice.add(new Instr(Form.COLR, colours));
     93      Lattice.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     94      Lattice.add(new Instr(Form.FILL, Color.black));
     95      Lattice.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
     96      Lattice.add(new Instr(Form.LINE, new Line2D.Double(-30, 0, -10, 0)));
     97      Lattice.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 30, 0)));
     98      p = new Path2D.Double(); p.moveTo(-20.0, 0.0); p.lineTo(-15.0, -70.0); p.lineTo(15.0, -70.0); p.lineTo(20.0, 0.0);
     99      p.moveTo(-19.0, -7.0); p.lineTo(17.5, -27.0); p.moveTo(19.0, -7.0); p.lineTo(-17.5, -27.0);
     100      p.moveTo(-15.0, -65.0); p.lineTo(16.0, -45.0); p.moveTo(15.0, -65.0); p.lineTo(-16.0, -45.0);
     101      Lattice.add(new Instr(Form.PLIN, p));
     102    }
     103
    77104    public static final Symbol LightFlare = new Symbol();
    78105    static {
     
    203230    static {
    204231        Shapes.put(BcnSHP.BCN_UNKN, Beacons.Beacon); Shapes.put(BcnSHP.BCN_STAK, Beacons.Stake); Shapes.put(BcnSHP.BCN_TOWR, Beacons.Tower);
    205         Shapes.put(BcnSHP.BCN_LATT, Beacons.Beacon); Shapes.put(BcnSHP.BCN_PILE, Beacons.Beacon); Shapes.put(BcnSHP.BCN_POLE, Beacons.Stake);
     232        Shapes.put(BcnSHP.BCN_LATT, Beacons.Lattice); Shapes.put(BcnSHP.BCN_PILE, Beacons.Beacon); Shapes.put(BcnSHP.BCN_POLE, Beacons.Stake);
    206233        Shapes.put(BcnSHP.BCN_CARN, Beacons.Cairn); Shapes.put(BcnSHP.BCN_BUOY, Beacons.Beacon); Shapes.put(BcnSHP.BCN_POST, Beacons.Stake);
    207234        Shapes.put(BcnSHP.BCN_PRCH, Beacons.Stake);
Note: See TracChangeset for help on using the changeset viewer.