Changeset 29114 in osm for applications
- Timestamp:
- 2012-12-24T15:48:16+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/symbols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/symbols/Landmarks.java
r29113 r29114 23 23 24 24 public class Landmarks { 25 private static final ArrayList<Instr> Base = new ArrayList<Instr>(); 26 static { 27 Base.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 28 Base.add(new Instr(Prim.FILL, Color.black)); 29 Base.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20))); 30 Base.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0))); 31 Base.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0))); 32 } 33 25 34 public static final ArrayList<Instr> Chimney = new ArrayList<Instr>(); 26 35 static { 27 Chimney.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 36 Chimney.add(new Instr(Prim.SYMB, Landmarks.Base)); 37 Base.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 28 38 Chimney.add(new Instr(Prim.FILL, Color.black)); 29 Chimney.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));30 Chimney.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));31 Chimney.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));32 39 Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-10.0,-120.0); p.lineTo(10.0,-120.0); p.lineTo(25.0,0.0); 33 40 p.moveTo(-10.0,-128.0); p.curveTo(-13.0,-147.0,15.0,-159.0,20.0,-148.0); … … 54 61 } 55 62 public static final ArrayList<Instr> Cross = new ArrayList<Instr>(); 63 static { 64 Cross.add(new Instr(Prim.SYMB, Landmarks.Base)); 65 Cross.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 66 Cross.add(new Instr(Prim.FILL, Color.black)); 67 Cross.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-150))); 68 Cross.add(new Instr(Prim.LINE, new Line2D.Double(-30,-115,30,-115))); 69 } 56 70 public static final ArrayList<Instr> DishAerial = new ArrayList<Instr>(); 71 static { 72 DishAerial.add(new Instr(Prim.SYMB, Landmarks.Base)); 73 DishAerial.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL))); 74 DishAerial.add(new Instr(Prim.FILL, Color.black)); 75 Path2D.Double p = new Path2D.Double(); p.moveTo(-7.8,-6.0); p.lineTo(0.0,-62.0); p.lineTo(7.8,-6.0); p.moveTo(18.0,-109.0); p.lineTo(25.0,-113.0); 76 p.moveTo(-9.5,-157.0); p.curveTo(-60.7,-125.5,-16.5,-33.9,44.9,-61.7); p.closePath(); 77 DishAerial.add(new Instr(Prim.PLIN, p)); 78 } 57 79 public static final ArrayList<Instr> Dome = new ArrayList<Instr>(); 58 80 static { … … 63 85 } 64 86 public static final ArrayList<Instr> Flagstaff = new ArrayList<Instr>(); 87 static { 88 Flagstaff.add(new Instr(Prim.SYMB, Landmarks.Base)); 89 Flagstaff.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 90 Flagstaff.add(new Instr(Prim.FILL, Color.black)); 91 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(0.0,-150.0); p.moveTo(0.0,-140.0); p.lineTo(40.0,-140.0); p.lineTo(40.0,-100.0); p.lineTo(0.0,-100.0); 92 Flagstaff.add(new Instr(Prim.PLIN, p)); 93 } 65 94 public static final ArrayList<Instr> FlareStack = new ArrayList<Instr>(); 95 static { 96 FlareStack.add(new Instr(Prim.SYMB, Landmarks.Base)); 97 FlareStack.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 98 FlareStack.add(new Instr(Prim.FILL, Color.black)); 99 Path2D.Double p = new Path2D.Double(); p.moveTo(-7.8,-6.0); p.lineTo(-7.8,-100.0); p.lineTo(7.8,-100.0); p.lineTo(7.8,-6.0); 100 FlareStack.add(new Instr(Prim.PLIN, p)); 101 FlareStack.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 102 p = new Path2D.Double(); p.moveTo(21.6,-169.6); p.curveTo(-22.0,-132.4,-27.4,-103.5,3.0,-100.0); p.curveTo(39.0,-118.0,-4.0,-141.0,21.6,-169.6); 103 FlareStack.add(new Instr(Prim.PLIN, p)); 104 } 66 105 public static final ArrayList<Instr> LandTower = new ArrayList<Instr>(); 106 static { 107 LandTower.add(new Instr(Prim.SYMB, Landmarks.Base)); 108 LandTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 109 LandTower.add(new Instr(Prim.FILL, Color.black)); 110 LandTower.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-120))); 111 LandTower.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-120))); 112 LandTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-15,-150,30,30))); 113 } 67 114 public static final ArrayList<Instr> Mast = new ArrayList<Instr>(); 68 115 static { 116 Mast.add(new Instr(Prim.SYMB, Landmarks.Base)); 69 117 Mast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL))); 70 118 Mast.add(new Instr(Prim.FILL, Color.black)); 71 Mast.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));72 Mast.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));73 Mast.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));74 119 Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(0.0,-150.0); p.lineTo(25.0,0.0); 75 120 Mast.add(new Instr(Prim.PLIN, p)); 76 121 } 77 public static final ArrayList<Instr> Minaret = new ArrayList<Instr>();78 public static final ArrayList<Instr> Monument = new ArrayList<Instr>();79 122 public static final ArrayList<Instr> RadioMast = new ArrayList<Instr>(); 80 123 static { 81 RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL))); 124 RadioMast.add(new Instr(Prim.SYMB, Landmarks.Mast)); 125 RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL))); 82 126 RadioMast.add(new Instr(Prim.FILL, Color.black)); 83 RadioMast.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));84 RadioMast.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));85 RadioMast.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));86 Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(0.0,-150.0); p.lineTo(25.0,0.0);87 RadioMast.add(new Instr(Prim.PLIN, p));88 RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL)));89 127 RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-30.0,-180.0,60.0,60.0,45.0,-90.0,Arc2D.OPEN))); 90 128 RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,45.0,-90.0,Arc2D.OPEN))); … … 92 130 RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,225.0,-90.0,Arc2D.OPEN))); 93 131 } 132 public static final ArrayList<Instr> Monument = new ArrayList<Instr>(); 133 static { 134 Monument.add(new Instr(Prim.SYMB, Landmarks.Base)); 135 Monument.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 136 Monument.add(new Instr(Prim.FILL, Color.black)); 137 Monument.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-105))); 138 Monument.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-105))); 139 Monument.add(new Instr(Prim.EARC, new Arc2D.Double(-25.0,-150.0,50.0,50.0,233.0,-285.0,Arc2D.OPEN))); 140 } 94 141 public static final ArrayList<Instr> Platform = new ArrayList<Instr>(); 95 142 static { … … 106 153 Spire.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-2,-2,4,4))); 107 154 } 155 public static final ArrayList<Instr> Minaret = new ArrayList<Instr>(); 156 static { 157 Minaret.add(new Instr(Prim.SYMB, Landmarks.Spire)); 158 Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 159 Minaret.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-50))); 160 Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 161 Minaret.add(new Instr(Prim.EARC, new Arc2D.Double(-40.0,-110.0,80.0,60.0,180.0,180.0,Arc2D.OPEN))); 162 } 108 163 public static final ArrayList<Instr> Temple = new ArrayList<Instr>(); 164 static { 165 Temple.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 166 Temple.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-15,50,30))); 167 Temple.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 168 Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,-21,35,21))); 169 Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,21,35,-21))); 170 } 109 171 public static final ArrayList<Instr> WaterTower = new ArrayList<Instr>(); 172 static { 173 WaterTower.add(new Instr(Prim.SYMB, Landmarks.Base)); 174 WaterTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 175 WaterTower.add(new Instr(Prim.FILL, Color.black)); 176 WaterTower.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-120))); 177 WaterTower.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-120))); 178 WaterTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-150,50,30))); 179 } 110 180 public static final ArrayList<Instr> WindMotor = new ArrayList<Instr>(); 181 static { 182 WindMotor.add(new Instr(Prim.SYMB, Landmarks.Base)); 183 WindMotor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 184 WindMotor.add(new Instr(Prim.FILL, Color.black)); 185 WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-90))); 186 WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,30,-90))); 187 WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14,-116.6))); 188 WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14.3,-66.7))); 189 } 111 190 public static final ArrayList<Instr> Windmill = new ArrayList<Instr>(); 191 static { 192 Windmill.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 193 Windmill.add(new Instr(Prim.FILL, Color.black)); 194 Windmill.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-12,-12,24,24))); 195 Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,-42,30,10))); 196 Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,10,30,-42))); 197 } 112 198 public static final ArrayList<Instr> Windsock = new ArrayList<Instr>(); 199 static { 200 Windsock.add(new Instr(Prim.SYMB, Landmarks.Base)); 201 Windsock.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 202 Windsock.add(new Instr(Prim.FILL, Color.black)); 203 Windsock.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-100))); 204 Windsock.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 205 Windsock.add(new Instr(Prim.LINE, new Line2D.Double(0,-100,0,-150))); 206 Windsock.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 207 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-100.0); p.lineTo(10.0,-100.0); p.lineTo(10.0,-150.0); p.lineTo(0.0,-150.0); 208 p.moveTo(10.0,-150.0); p.lineTo(50.0,-145.0); p.lineTo(120.0,-70.0); p.quadTo(120.0,-55.0,105.0,-55.0); 209 p.lineTo(55,-95); p.lineTo(40,-102); p.lineTo(10,-100); p.moveTo(40,-102); p.lineTo(50,-120); p.moveTo(55,-95); p.lineTo(75,-97); 210 Windsock.add(new Instr(Prim.PLIN, p)); 211 } 113 212 } -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r29082 r29114 30 30 } 31 31 32 public static final double symbolScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.61, 0.372, 0.227, 0.138,32 public static final double symbolScale[] = { 1.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.61, 0.372, 0.227, 0.138, 33 33 0.0843, 0.0514, 0.0313, 0.0191, 0.0117, 0.007, 0.138 }; 34 34 35 public static final double textScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5556, 0.3086, 0.1714, 0.0953,35 public static final double textScale[] = { 1.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5556, 0.3086, 0.1714, 0.0953, 36 36 0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 }; 37 37 … … 225 225 break; 226 226 case SYMB: 227 drawSymbol(g2, (ArrayList<Instr>) item.params, zoom, 0.0, 0.0, null, null);227 drawSymbol(g2, (ArrayList<Instr>) item.params, 0, 0.0, 0.0, null, null); 228 228 break; 229 229 }
Note:
See TracChangeset
for help on using the changeset viewer.