Changeset 33195 in osm for applications
- Timestamp:
- 2017-03-24T10:46:53+01:00 (8 years ago)
- 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 77 77 g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); 78 78 g2.setStroke(new BasicStroke(0, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); 79 Rules.rules();79 do {} while (!Rules.rules()); 80 80 } 81 81 } -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r33193 r33195 7 7 import java.text.DecimalFormat; 8 8 import java.util.ArrayList; 9 import java.util.ConcurrentModificationException; 9 10 import java.util.EnumMap; 10 11 import java.util.HashMap; … … 251 252 } 252 253 253 public static voidrules() {254 public static boolean rules() { 254 255 try { 255 256 if ((Renderer.context.ruleset() == RuleSet.ALL) || (Renderer.context.ruleset() == RuleSet.BASE)) { … … 347 348 if (testObject(Obj.BCNSPP)) for (Feature f : objects) if (testFeature(f)) beacons(); 348 349 } 350 } catch (ConcurrentModificationException e) { 351 return false; 349 352 } catch (Exception e) { 350 return ; // Just skip this pass353 return true; 351 354 } 355 return true; 352 356 } 353 357 -
applications/editors/josm/plugins/seachart/src/symbols/Beacons.java
r32907 r33195 75 75 } 76 76 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 77 104 public static final Symbol LightFlare = new Symbol(); 78 105 static { … … 203 230 static { 204 231 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); 206 233 Shapes.put(BcnSHP.BCN_CARN, Beacons.Cairn); Shapes.put(BcnSHP.BCN_BUOY, Beacons.Beacon); Shapes.put(BcnSHP.BCN_POST, Beacons.Stake); 207 234 Shapes.put(BcnSHP.BCN_PRCH, Beacons.Stake);
Note:
See TracChangeset
for help on using the changeset viewer.