Changeset 33956 in osm for applications
- Timestamp:
- 2017-12-18T21:59:09+01:00 (7 years ago)
- Location:
- applications/editors/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Rules.java
r33949 r33956 527 527 @SuppressWarnings("unchecked") 528 528 private static void beacons() { 529 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR))) || ((Renderer.zoom >= 11) && ((feature.type == Obj.BCNSAW) || hasObject(Obj.RTPBCN)))) { 529 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR))) 530 || ((Renderer.zoom >= 11) && ((feature.type == Obj.BCNSAW) || hasObject(Obj.RTPBCN)))) { 531 if (testAttribute(feature.type, Att.STATUS, StsSTS.STS_ILLD)) { 532 Renderer.symbol(Beacons.Floodlight); 533 } 530 534 BcnSHP shape = (BcnSHP) getAttEnum(feature.type, Att.BCNSHP); 531 535 if (shape == BcnSHP.BCN_UNKN) … … 557 561 if (feature.objs.containsKey(Obj.TOPMAR)) { 558 562 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 559 if (t opmap.containsKey(Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) {563 if (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD)) { 560 564 Renderer.symbol(Beacons.Floodlight); 561 565 } 562 566 if (topmap.containsKey(Att.TOPSHP)) { 563 if (topmap.containsKey(Att.ORIENT)) {564 // tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));565 }566 567 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta); 567 568 } … … 873 874 case BUISGL: 874 875 if (Renderer.zoom >= 16) { 875 if ( hasAttribute(Obj.BUISGL, Att.STATUS) && (testAttribute(Obj.BUISGL, Att.STATUS, StsSTS.STS_ILLD))) {876 if (testAttribute(Obj.BUISGL, Att.STATUS, StsSTS.STS_ILLD)) { 876 877 Renderer.symbol(Beacons.Floodlight); 877 878 } … … 956 957 switch (feature.type) { 957 958 case LNDMRK: 958 if ( hasAttribute(Obj.LNDMRK, Att.STATUS) && (testAttribute(Obj.LNDMRK, Att.STATUS, StsSTS.STS_ILLD))) {959 if (testAttribute(Obj.LNDMRK, Att.STATUS, StsSTS.STS_ILLD)) { 959 960 Renderer.symbol(Beacons.Floodlight); 960 961 } … … 998 999 case PILPNT: 999 1000 if (Renderer.zoom >= 14) { 1000 if ( hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) {1001 if (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL)) { 1001 1002 Renderer.symbol(Beacons.Floodlight, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180)))); 1002 1003 Renderer.symbol(Harbours.SignalStation); … … 1012 1013 if (ok) { 1013 1014 if (feature.objs.containsKey(Obj.TOPMAR)) { 1014 if ( hasAttribute(Obj.TOPMAR, Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) {1015 if (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD)) { 1015 1016 Renderer.symbol(Beacons.Floodlight); 1016 1017 } … … 1216 1217 else 1217 1218 Renderer.symbol(Landmarks.Platform); 1219 if (testAttribute(feature.type, Att.STATUS, StsSTS.STS_ILLD)) { 1220 Renderer.symbol(Beacons.Floodlight); 1221 } 1218 1222 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50))); 1219 1223 Signals.addSignals(); … … 1235 1239 default: 1236 1240 if (Renderer.zoom >= 14) { 1241 if (testAttribute(feature.type, Att.STATUS, StsSTS.STS_ILLD)) { 1242 Renderer.symbol(Beacons.Floodlight); 1243 } 1237 1244 if (feature.objs.containsKey(Obj.LIGHTS)) 1238 1245 lights(); -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r33936 r33956 377 377 @SuppressWarnings("unchecked") 378 378 public static void lights() { 379 if ((hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL)))) 380 return; 379 381 Enum<ColCOL> col = null; 380 382 Enum<ColCOL> tcol = null; … … 397 399 } 398 400 } 399 if (!(hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL)))) { 400 Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)), 401 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120)))); 402 } 401 Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)), 402 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120)))); 403 403 if (Renderer.zoom >= 12) { 404 404 String str = ""; … … 698 698 } 699 699 } 700 -
applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java
r33949 r33956 42 42 public static final Symbol TopArrow = new Symbol(); 43 43 static { 44 TopArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(- 20, -80, 40, 80)));44 TopArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(-40, -80, 80, 80))); 45 45 TopArrow.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 46 46 TopArrow.add(new Instr(Form.FILL, Color.black)); 47 Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -30); p.lineTo(-2 5, -30); p.lineTo(-30, -20); p.lineTo(-25, -10); p.lineTo(0, -10);47 Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -30); p.lineTo(-20, -30); p.lineTo(-30, -20); p.lineTo(-20, -10); p.lineTo(0, -10); 48 48 TopArrow.add(new Instr(Form.PLIN, p)); 49 49 }
Note:
See TracChangeset
for help on using the changeset viewer.