Changeset 30120 in osm
- Timestamp:
- 2013-12-08T23:00:06+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30119 r30120 536 536 case HRBFAC: 537 537 if (zoom >= 12) { 538 switch ((CatHAF) getAttVal(feature, feature.type, 0, Att.CATHAF)) { 539 case HAF_MRNA: 540 Renderer.symbol(feature, Harbours.Marina); 541 break; 542 case HAF_MANF: 543 Renderer.symbol(feature, Harbours.MarinaNF); 544 break; 545 default: 538 ArrayList<CatHAF> cathaf = (ArrayList<CatHAF>) getAttVal(feature, Obj.HRBFAC, 0, Att.CATHAF); 539 if (cathaf.size() == 1) { 540 switch (cathaf.get(0)) { 541 case HAF_MRNA: 542 Renderer.symbol(feature, Harbours.Marina); 543 break; 544 case HAF_MANF: 545 Renderer.symbol(feature, Harbours.MarinaNF); 546 break; 547 case HAF_FISH: 548 Renderer.symbol(feature, Harbours.Fishing); 549 break; 550 default: 551 Renderer.symbol(feature, Harbours.Harbour); 552 break; 553 } 554 } else { 546 555 Renderer.symbol(feature, Harbours.Harbour); 547 break;548 549 }556 } 557 } 558 break; 550 559 default: 551 560 break; -
applications/editors/josm/plugins/smed2/src/symbols/Harbours.java
r30033 r30120 14 14 import java.awt.geom.*; 15 15 16 import seamap.Renderer; 16 17 import symbols.Symbols.*; 17 18 … … 28 29 Anchor.add(new Instr(Prim.PGON, p)); 29 30 } 31 public static final Symbol Yacht = new Symbol(); 32 static { 33 Yacht.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 34 Path2D.Double p = new Path2D.Double(); p.moveTo(-65.0,50.0); p.curveTo(-36.0,97.0,36.0,97.0,65.0,50.0); p.lineTo(3.0,50.0); p.lineTo(3.0,40.0); p.lineTo(55.0,30.0); 35 p.curveTo(32.0,4.0,25.0,-15.0,26.0,-52.0); p.lineTo(1.5,-40.0); p.lineTo(1.0,-64.0); p.lineTo(-2.0,-64.0); p.lineTo(-4.0,50.0); p.closePath(); 36 p.moveTo(-50.0,45.0); p.curveTo(-55.0,3.0,-37.0,-28.5,-7.0,-46.0); p.curveTo(-28.0,-15.0,-26.0,11.0,-20.5,30.0); p.closePath(); 37 Yacht.add(new Instr(Prim.PGON, p)); 38 } 30 39 public static final Symbol Anchorage = new Symbol(); 31 40 static { 32 Anchorage.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, n ull, null)));41 Anchorage.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, new Scheme(Renderer.Msymb), null))); 33 42 } 34 43 public static final Symbol Bollard = new Symbol(); … … 70 79 static { 71 80 DistanceU.add(new Instr(Prim.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 72 DistanceU.add(new Instr(Prim.FILL, new Color(0xa30075)));81 DistanceU.add(new Instr(Prim.FILL, Renderer.Msymb)); 73 82 DistanceU.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22))); 74 83 } … … 93 102 Explosives.add(new Instr(Prim.PLIN, p)); 94 103 } 104 public static final Symbol Fishing = new Symbol(); 105 static { 106 Fishing.add(new Instr(Prim.STRK, new BasicStroke(15, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 107 Fishing.add(new Instr(Prim.FILL, Renderer.Msymb)); 108 Fishing.add(new Instr(Prim.EARC, new Arc2D.Double(-75,-75,150,150,15,140,Arc2D.OPEN))); 109 Fishing.add(new Instr(Prim.EARC, new Arc2D.Double(-75,-75,150,150,-15,-140,Arc2D.OPEN))); 110 Path2D.Double p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD); 111 p.moveTo(-40,5); p.curveTo(20,40,50,25,80,0); p.curveTo(50,-25,20,-40,-40,-5); 112 p.lineTo(-75,-25); p.quadTo(-80, 0, -75, 25); p.closePath(); 113 p.moveTo(42, 0); p.curveTo(42, 10, 56, 10, 56, 0); p.curveTo(56, -10, 42, -10, 42, 0); p.closePath(); 114 Fishing.add(new Instr(Prim.PGON, p)); 115 } 95 116 public static final Symbol Harbour = new Symbol(); 96 117 static { 97 118 Harbour.add(new Instr(Prim.STRK, new BasicStroke(15, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 98 Harbour.add(new Instr(Prim.FILL, new Color(0xa30075)));119 Harbour.add(new Instr(Prim.FILL, Renderer.Msymb)); 99 120 Harbour.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-75,-75,150,150))); 100 Harbour.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, n ull, null)));121 Harbour.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, new Scheme(Renderer.Msymb), null))); 101 122 } 102 123 public static final Symbol HarbourMaster = new Symbol(); … … 118 139 public static final Symbol LandingSteps = new Symbol(); 119 140 static { 120 LandingSteps.add(new Instr(Prim.FILL, new Color(0xa30075)));141 LandingSteps.add(new Instr(Prim.FILL, Renderer.Msymb)); 121 142 Path2D.Double p = new Path2D.Double(); p.moveTo(-20,-10); p.lineTo(10,20); p.lineTo(20,20); p.lineTo(20,10); 122 143 p.lineTo(10,10); p.lineTo(10,0); p.lineTo(0,0); p.lineTo(0,-10); p.lineTo(-10,-10); p.lineTo(-10,-20); p.lineTo(-20,-20); p.closePath(); … … 128 149 static { 129 150 Marina.add(new Instr(Prim.STRK, new BasicStroke(15, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 130 Marina.add(new Instr(Prim.FILL, new Color(0xa30075)));131 Marina.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, n ull, null)));151 Marina.add(new Instr(Prim.FILL, Renderer.Msymb)); 152 Marina.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, new Scheme(Renderer.Msymb), null))); 132 153 Marina.add(new Instr(Prim.EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN))); 133 154 } … … 135 156 static { 136 157 MarinaNF.add(new Instr(Prim.STRK, new BasicStroke(15, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 137 MarinaNF.add(new Instr(Prim.FILL, new Color(0xa30075))); 138 MarinaNF.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, null, null))); 158 MarinaNF.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, new Scheme(Renderer.Msymb), null))); 139 159 } 140 160 public static final Symbol Pilot = new Symbol(); … … 181 201 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-65,15,-65))); 182 202 } 183 public static final Symbol Yacht = new Symbol();184 static {185 Yacht.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));186 Path2D.Double p = new Path2D.Double(); p.moveTo(-65.0,50.0); p.curveTo(-36.0,97.0,36.0,97.0,65.0,50.0); p.lineTo(3.0,50.0); p.lineTo(3.0,40.0); p.lineTo(55.0,30.0);187 p.curveTo(32.0,4.0,25.0,-15.0,26.0,-52.0); p.lineTo(1.5,-40.0); p.lineTo(1.0,-64.0); p.lineTo(-2.0,-64.0); p.lineTo(-4.0,50.0); p.closePath();188 p.moveTo(-50.0,45.0); p.curveTo(-55.0,3.0,-37.0,-28.5,-7.0,-46.0); p.curveTo(-28.0,-15.0,-26.0,11.0,-20.5,30.0); p.closePath();189 Yacht.add(new Instr(Prim.PGON, p));190 }191 203 }
Note:
See TracChangeset
for help on using the changeset viewer.