Changeset 30325 in osm for applications/editors/josm/plugins/smed2/src/symbols
- Timestamp:
- 2014-03-16T14:21:57+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/symbols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/smed2/src/symbols/Harbours.java ¶
r30285 r30325 104 104 public static final Symbol Fishing = new Symbol(); 105 105 static { 106 Fishing.add(new Instr(Form.STRK, new BasicStroke(1 5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));106 Fishing.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 107 107 Fishing.add(new Instr(Form.FILL, Rules.Msymb)); 108 Fishing.add(new Instr(Form.EARC, new Arc2D.Double(- 75,-75,150,150,15,140,Arc2D.OPEN)));109 Fishing.add(new Instr(Form.EARC, new Arc2D.Double(- 75,-75,150,150,-15,-140,Arc2D.OPEN)));108 Fishing.add(new Instr(Form.EARC, new Arc2D.Double(-50,-50,100,100,15,140,Arc2D.OPEN))); 109 Fishing.add(new Instr(Form.EARC, new Arc2D.Double(-50,-50,100,100,-15,-140,Arc2D.OPEN))); 110 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();111 p.moveTo(-24,3); p.curveTo(12,24,30,15,48,0); p.curveTo(30,-15,12,-24,-24,-3); 112 p.lineTo(-45,-15); p.quadTo(-48, 0, -45, 15); p.closePath(); 113 p.moveTo(25, 0); p.curveTo(25, 6, 34, 6, 34, 0); p.curveTo(34, -6, 25, -6, 25, 0); p.closePath(); 114 114 Fishing.add(new Instr(Form.PGON, p)); 115 115 } 116 116 public static final Symbol Harbour = new Symbol(); 117 117 static { 118 Harbour.add(new Instr(Form.STRK, new BasicStroke(1 5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));118 Harbour.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 119 119 Harbour.add(new Instr(Form.FILL, Rules.Msymb)); 120 Harbour.add(new Instr(Form.ELPS, new Ellipse2D.Double(- 75,-75,150,150)));121 Harbour.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, new Scheme(Rules.Msymb), null)));120 Harbour.add(new Instr(Form.ELPS, new Ellipse2D.Double(-50,-50,100,100))); 121 Harbour.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.6, 0, 0, new Scheme(Rules.Msymb), null))); 122 122 } 123 123 public static final Symbol HarbourMaster = new Symbol(); … … 148 148 public static final Symbol Marina = new Symbol(); 149 149 static { 150 Marina.add(new Instr(Form.STRK, new BasicStroke(1 5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));150 Marina.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 151 151 Marina.add(new Instr(Form.FILL, Rules.Msymb)); 152 Marina.add(new Instr(Form. SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, new Scheme(Rules.Msymb), null)));153 Marina.add(new Instr(Form. EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN)));152 Marina.add(new Instr(Form.EARC, new Arc2D.Double(-50.0,-50.0,100.0,100.0,215.0,-250.0,Arc2D.OPEN))); 153 Marina.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 0.6, 0, 0, new Scheme(Rules.Msymb), null))); 154 154 } 155 155 public static final Symbol MarinaNF = new Symbol(); 156 156 static { 157 MarinaNF.add(new Instr(Form.STRK, new BasicStroke(15, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 158 MarinaNF.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, new Scheme(Rules.Msymb), null))); 157 MarinaNF.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 0.6, 0, 0, new Scheme(Rules.Msymb), null))); 159 158 } 160 159 public static final Symbol Pilot = new Symbol(); -
TabularUnified applications/editors/josm/plugins/smed2/src/symbols/Symbols.java ¶
r30285 r30325 21 21 22 22 public enum Form { 23 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, RSHP, TEXT, SYMB, P1, P2, H2, H3, H4, H5, V2, D2, D3, D4, B2, S2, S3, S4, C2, X2 23 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, RSHP, TEXT, SYMB, P1, P2, H2, H3, H4, H5, V2, V3, D2, D3, D4, B2, S2, S3, S4, C2, X2 24 24 } 25 25 … … 260 260 } 261 261 break; 262 case V3: 263 if ((cn == 3) && (cs.pat.get(0) == Patt.V)) { 264 g2.setPaint(cs.col.get(1)); 265 g2.fill((Path2D.Double) patch.params); 266 } 267 break; 262 268 default: 263 269 break; -
TabularUnified applications/editors/josm/plugins/smed2/src/symbols/Topmarks.java ¶
r30285 r30325 92 92 TopEast.add(new Instr(Form.PLIN, p)); 93 93 } 94 public static final Symbol TopIcone = new Symbol(); 95 static { 96 TopIcone.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80))); 97 Symbol colours = new Symbol(); 98 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-45.0); p.lineTo(0.0,-15.0); p.lineTo(15.0,-45.0); p.closePath(); 99 colours.add(new Instr(Form.P1, p)); 100 TopIcone.add(new Instr(Form.COLR, colours)); 101 TopIcone.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 102 TopIcone.add(new Instr(Form.FILL, Color.black)); 103 TopIcone.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15))); 104 p = new Path2D.Double(); p.moveTo(-15.0,-45.0); p.lineTo(0.0,-15.0); p.lineTo(15.0,-45.0); p.closePath(); 105 TopIcone.add(new Instr(Form.PLIN, p)); 106 } 94 107 public static final Symbol TopIsol = new Symbol(); 95 108 static { … … 169 182 Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-1.0); p.lineTo(-13.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath(); 170 183 colours.add(new Instr(Form.P1, p)); 184 p = new Path2D.Double(); p.moveTo(-13.0,-15.0); p.lineTo(-13.0,-1.0); p.lineTo(13.0,-1.0); p.lineTo(13.0,-15.0); p.closePath(); 185 colours.add(new Instr(Form.H2, p)); 186 p = new Path2D.Double(); p.moveTo(-13.0,-19.3); p.lineTo(-13.0,-10.7); p.lineTo(13.0,-10.7); p.lineTo(13.0,-19.3); p.closePath(); 187 colours.add(new Instr(Form.H3, p)); 188 p = new Path2D.Double(); p.moveTo(0.0,-1.0); p.lineTo(0.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath(); 189 colours.add(new Instr(Form.V2, p)); 190 p = new Path2D.Double(); p.moveTo(-4.3,-1.0); p.lineTo(-4.3,-27.0); p.lineTo(4.3,-27.0); p.lineTo(4.3,-1.0); p.closePath(); 191 colours.add(new Instr(Form.V3, p)); 171 192 TopSquare.add(new Instr(Form.COLR, colours)); 172 193 TopSquare.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 175 196 TopSquare.add(new Instr(Form.PLIN, p)); 176 197 } 198 public static final Symbol TopRhombus = new Symbol(); 199 static { 200 TopRhombus.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80))); 201 Symbol colours = new Symbol(); 202 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-29.0); p.lineTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath(); 203 colours.add(new Instr(Form.P1, p)); 204 p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath(); 205 colours.add(new Instr(Form.H2, p)); 206 p = new Path2D.Double(); p.moveTo(-10.0,-19.7); p.lineTo(-15.0,-15.0); p.lineTo(-10.0,-10.3); p.lineTo(10.0,-10.3); p.lineTo(15.0,-15.0); p.lineTo(10.0,-19.7); p.closePath(); 207 colours.add(new Instr(Form.H3, p)); 208 TopRhombus.add(new Instr(Form.COLR, colours)); 209 TopRhombus.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 210 TopRhombus.add(new Instr(Form.FILL, Color.black)); 211 p = new Path2D.Double(); p.moveTo(0.0,-29.0); p.lineTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath(); 212 TopRhombus.add(new Instr(Form.PLIN, p)); 213 } 177 214 public static final Symbol TopTriangle = new Symbol(); 178 215 static { … … 186 223 p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath(); 187 224 TopTriangle.add(new Instr(Form.PLIN, p)); 225 } 226 public static final Symbol TopItriangle = new Symbol(); 227 static { 228 TopItriangle.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80))); 229 Symbol colours = new Symbol(); 230 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath(); 231 colours.add(new Instr(Form.P1, p)); 232 TopItriangle.add(new Instr(Form.COLR, colours)); 233 TopItriangle.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 234 TopItriangle.add(new Instr(Form.FILL, Color.black)); 235 p = new Path2D.Double(); p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath(); 236 TopItriangle.add(new Instr(Form.PLIN, p)); 188 237 } 189 238 public static final Symbol TopWest = new Symbol(); … … 224 273 static { 225 274 Shapes.put(TopSHP.TOP_BORD, TopBoard); Shapes.put(TopSHP.TOP_CAN, TopCan); Shapes.put(TopSHP.TOP_CONE, TopCone); Shapes.put(TopSHP.TOP_CROS, TopCross); 226 th); Shapes.put(TopSHP.TOP_SOUTH, TopSouth);227 Shapes.put(TopSHP.TOP_SPHR, TopSphere); Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle ); Shapes.put(TopSHP.TOP_WEST, TopWest);228 Shapes.put(TopSHP.TOP_SALT, TopX); 275 Shapes.put(TopSHP.TOP_EAST, TopEast); Shapes.put(TopSHP.TOP_ICONE, TopIcone); Shapes.put(TopSHP.TOP_ISD, TopIsol); Shapes.put(TopSHP.TOP_NORTH, TopNorth); 276 Shapes.put(TopSHP.TOP_SOUTH, TopSouth); Shapes.put(TopSHP.TOP_SPHR, TopSphere); Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle); 277 Shapes.put(TopSHP.TOP_ITRI, TopItriangle); Shapes.put(TopSHP.TOP_WEST, TopWest); Shapes.put(TopSHP.TOP_SALT, TopX); Shapes.put(TopSHP.TOP_RHOM, TopRhombus); 229 278 } 230 279 public static final EnumMap<BoySHP, Delta> BuoyDeltas = new EnumMap<BoySHP, Delta>(BoySHP.class); … … 232 281 BuoyDeltas.put(BoySHP.BOY_PILR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 31.5, -95.0))); 233 282 BuoyDeltas.put(BoySHP.BOY_SPAR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 31.5, -95.0))); 234 BuoyDeltas.put(BoySHP.BOY_CAN, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9))); 283 BuoyDeltas.put(BoySHP.BOY_CAN, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9))); 235 284 BuoyDeltas.put(BoySHP.BOY_CONE, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9))); 236 285 BuoyDeltas.put(BoySHP.BOY_SPHR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9)));
Note:
See TracChangeset
for help on using the changeset viewer.