Changeset 33949 in osm for applications
- Timestamp:
- 2017-12-10T13:59:43+01:00 (7 years ago)
- Location:
- applications/editors/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jicons/examples.xml
r33947 r33949 23 23 <tag k="seamark:type" v="light" /> 24 24 <tag k="seamark:light:category" v="floodlight" /> 25 </icon> 26 <icon width="100" height="150" scale="0.5" file="beacon" format="PNG" > 27 <tag k="seamark:type" v="beacon_lateral" /> 28 <tag k="seamark:beacon_lateral:shape" v="stake" /> 29 <tag k="seamark:light:category" v="floodlight" /> 25 30 <tag k="seamark:topmark:shape" v="arrow" /> 31 <tag k="seamark:topmark:status" v="illuminated" /> 26 32 <tag k="seamark:topmark:orientation" v="45" /> 27 33 </icon> -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r33947 r33949 555 555 } else { 556 556 Renderer.symbol(Beacons.Shapes.get(shape), getScheme(feature.type)); 557 AffineTransform tr = new AffineTransform(Topmarks.BeaconDelta.t);558 557 if (feature.objs.containsKey(Obj.TOPMAR)) { 559 558 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); … … 563 562 if (topmap.containsKey(Att.TOPSHP)) { 564 563 if (topmap.containsKey(Att.ORIENT)) { 565 tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));564 // tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val)); 566 565 } 567 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr));566 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta); 568 567 } 569 568 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 570 569 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 571 if (topmap.containsKey(Att.STATUS) && (testAttribute(Obj.DAYMAR, Att.STATUS, StsSTS.STS_ILLD))) {572 Renderer.symbol(Beacons.Floodlight);573 }574 570 if (topmap.containsKey(Att.TOPSHP)) { 575 if (topmap.containsKey(Att.ORIENT)) { 576 tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val)); 577 } 578 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr)); 571 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.BeaconDelta); 579 572 } 580 573 } … … 1006 999 if (Renderer.zoom >= 14) { 1007 1000 if (hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) { 1008 Renderer.symbol(Beacons.Floodlight );1001 Renderer.symbol(Beacons.Floodlight, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180)))); 1009 1002 Renderer.symbol(Harbours.SignalStation); 1010 1003 } else { … … 1018 1011 } 1019 1012 if (ok) { 1020 AffineTransform tr = new AffineTransform();1021 1013 if (feature.objs.containsKey(Obj.TOPMAR)) { 1022 1014 if (hasAttribute(Obj.TOPMAR, Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) { … … 1025 1017 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 1026 1018 if (topmap.containsKey(Att.TOPSHP)) { 1027 if (topmap.containsKey(Att.ORIENT)) { 1028 tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val)); 1029 } 1030 tr.concatenate(Topmarks.LightDelta.t); 1031 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr)); 1019 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.LightDelta); 1032 1020 } 1033 1021 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 1034 if (hasAttribute(Obj.DAYMAR, Att.STATUS) && (testAttribute(Obj.DAYMAR, Att.STATUS, StsSTS.STS_ILLD))) {1035 Renderer.symbol(Beacons.Floodlight);1036 }1037 1022 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 1038 1023 if (topmap.containsKey(Att.TOPSHP)) { 1039 if (topmap.containsKey(Att.ORIENT)) { 1040 tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val)); 1041 } 1042 tr.concatenate(Topmarks.LightDelta.t); 1043 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr)); 1024 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.LightDelta); 1044 1025 } 1045 1026 } -
applications/editors/josm/plugins/seachart/src/symbols/Beacons.java
r33936 r33949 65 65 public static final Symbol Floodlight = new Symbol(); 66 66 static { 67 Floodlight.add(new Instr(Form.BBOX, new Rectangle2D.Double(- 20, -100, 100, 100)));67 Floodlight.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50, -50, 100, 100))); 68 68 Floodlight.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 69 69 Floodlight.add(new Instr(Form.FILL, new Color(0xffa000))); -
applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java
r33943 r33949 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, -25); p.lineTo(-10, -25); p.lineTo(-10, -43); 48 p.lineTo(0, -50); p.lineTo(10, -43); p.lineTo(10, -25); p.lineTo(0, -25); 47 Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -30); p.lineTo(-25, -30); p.lineTo(-30, -20); p.lineTo(-25, -10); p.lineTo(0, -10); 49 48 TopArrow.add(new Instr(Form.PLIN, p)); 50 49 }
Note:
See TracChangeset
for help on using the changeset viewer.