Changeset 29132 in osm for applications/editors
- Timestamp:
- 2012-12-27T22:20:38+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/Harbours.java
r29126 r29132 13 13 import java.awt.Color; 14 14 import java.awt.Rectangle; 15 import java.awt.geom.Arc2D; 16 import java.awt.geom.Ellipse2D; 17 import java.awt.geom.Line2D; 18 import java.awt.geom.Path2D; 19 import java.awt.geom.Rectangle2D; 15 import java.awt.geom.*; 20 16 import java.util.ArrayList; 21 17 -
applications/editors/josm/plugins/smed2/src/symbols/Notices.java
r29120 r29132 10 10 package symbols; 11 11 12 import java.awt.BasicStroke; 13 import java.awt.Color; 14 import java.awt.Rectangle; 15 import java.awt.geom.*; 12 16 import java.util.ArrayList; 13 17 18 import symbols.Symbols.Delta; 19 import symbols.Symbols.Handle; 14 20 import symbols.Symbols.Instr; 21 import symbols.Symbols.Prim; 15 22 16 23 public class Notices { 17 public static final ArrayList<Instr> NoticeAnchor = new ArrayList<Instr>(); 18 public static final ArrayList<Instr> NoticeBollard = new ArrayList<Instr>(); 19 public static final ArrayList<Instr> NoticeCrossing = new ArrayList<Instr>(); 20 public static final ArrayList<Instr> NoticeCrossingL = new ArrayList<Instr>(); 21 public static final ArrayList<Instr> NoticeCrossingR = new ArrayList<Instr>(); 22 public static final ArrayList<Instr> NoticeJunction = new ArrayList<Instr>(); 23 public static final ArrayList<Instr> NoticeJunctionL = new ArrayList<Instr>(); 24 public static final ArrayList<Instr> NoticeJunctionR = new ArrayList<Instr>(); 25 public static final ArrayList<Instr> NoticeMotor = new ArrayList<Instr>(); 26 public static final ArrayList<Instr> NoticeP = new ArrayList<Instr>(); 27 public static final ArrayList<Instr> NoticeProceed = new ArrayList<Instr>(); 28 public static final ArrayList<Instr> NoticeRowboat = new ArrayList<Instr>(); 29 public static final ArrayList<Instr> NoticeSailboard = new ArrayList<Instr>(); 30 public static final ArrayList<Instr> NoticeSailboat = new ArrayList<Instr>(); 31 public static final ArrayList<Instr> NoticeSlipway = new ArrayList<Instr>(); 32 public static final ArrayList<Instr> NoticeSpeedboat = new ArrayList<Instr>(); 33 public static final ArrayList<Instr> NoticeSport = new ArrayList<Instr>(); 34 public static final ArrayList<Instr> NoticeTurn = new ArrayList<Instr>(); 35 public static final ArrayList<Instr> NoticeVHF = new ArrayList<Instr>(); 36 public static final ArrayList<Instr> NoticeWaterbike = new ArrayList<Instr>(); 37 public static final ArrayList<Instr> NoticeWaterski = new ArrayList<Instr>(); 24 private static final ArrayList<Instr> Bollard = new ArrayList<Instr>(); 25 static { 26 Bollard.add(new Instr(Prim.FILL, Color.black)); 27 Path2D.Double p = new Path2D.Double(); p.moveTo(20,21); p.lineTo(20,16.5); p.lineTo(11.6,16.5); p.quadTo(9.1,9.6,8.3,2.0); p.lineTo(-8.0,-0.3); p.quadTo(-8.6,9.0,-11.3,16.5); 28 p.lineTo(-23.5,16.5); p.lineTo(-23.5,21.0); p.closePath(); p.moveTo(23.8,3.0); p.lineTo(-10.7,-1.8); p.curveTo(-13.1,-2.2,-12.8,-6.0,-10.2,-5.8); p.lineTo(23.8,-1.1); 29 p.closePath(); p.moveTo(8.4,-4.3); p.curveTo(9.0,-9.3,9.0,-11.4,11.2,-13.0); p.curveTo(12.8,-15.0,12.8,-16.7,11.0,-18.6); p.curveTo(4.0,-22.2,-4.0,-22.2,-11.0,-18.6); 30 p.curveTo(-12.8,-16.7,-12.8,-15.0,-11.2,-13.0); p.curveTo(-9.0,-11.3,-8.7,-9.5,-8.4,-6.5); p.closePath(); 31 Bollard.add(new Instr(Prim.PGON, p)); 32 } 33 private static final ArrayList<Instr> Crossing = new ArrayList<Instr>(); 34 private static final ArrayList<Instr> CrossingL = new ArrayList<Instr>(); 35 private static final ArrayList<Instr> CrossingR = new ArrayList<Instr>(); 36 private static final ArrayList<Instr> Junction = new ArrayList<Instr>(); 37 private static final ArrayList<Instr> JunctionL = new ArrayList<Instr>(); 38 private static final ArrayList<Instr> JunctionR = new ArrayList<Instr>(); 39 private static final ArrayList<Instr> Motor = new ArrayList<Instr>(); 40 static { 41 Motor.add(new Instr(Prim.FILL, Color.black)); 42 Path2D.Double p = new Path2D.Double(); p.moveTo(-5.0,4.3); p.curveTo(-3.7,5.5,-1.8,5.7,-0.2,4.9); p.curveTo(1.3,8.7,4.6,10.9,8.4,10.9); p.curveTo(14.0,10.9,17.5,6.3,17.5,2.0); 43 p.curveTo(17.5,-0.7,16.1,-3.2,14.5,-3.2); p.curveTo(12.5,-3.2,11.7,0.8,2.5,1.1); p.curveTo(2.5,-1.2,1.6,-2.2,0.6,-3.0); p.curveTo(3.2,-5.6,4.0,-12.6,-1.0,-16.1); 44 p.curveTo(-5.3,-19.2,-11.6,-18.3,-13.7,-13.7); p.curveTo(-14.3,-12.2,-14.0,-11.2,-12.5,-10.6); p.curveTo(-8.6,-9.6,-5.3,-6.0,-4.0,-3.4); p.curveTo(-5.4,-2.6,-6.2,-2.0,-6.2,0.2); 45 p.curveTo(-12.8,-1.0,-17.5,3.7,-17.5,9.3); p.curveTo(-17.5,14.7,-12.6,18.8,-8.0,17.6); p.curveTo(-7.0,17.2,-6.6,16.2,-7.2,14.6); p.curveTo(-7.7,12.4,-7.0,7.7,-5.0,4.3); p.closePath(); 46 Motor.add(new Instr(Prim.PGON, p)); 47 } 48 private static final ArrayList<Instr> Proceed = new ArrayList<Instr>(); 49 private static final ArrayList<Instr> Rowboat = new ArrayList<Instr>(); 50 private static final ArrayList<Instr> Sailboard = new ArrayList<Instr>(); 51 private static final ArrayList<Instr> Sailboat = new ArrayList<Instr>(); 52 private static final ArrayList<Instr> Slipway = new ArrayList<Instr>(); 53 private static final ArrayList<Instr> Speedboat = new ArrayList<Instr>(); 54 private static final ArrayList<Instr> Sport = new ArrayList<Instr>(); 55 private static final ArrayList<Instr> Turn = new ArrayList<Instr>(); 56 static { 57 Turn.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 58 Turn.add(new Instr(Prim.FILL, Color.black)); 59 Turn.add(new Instr(Prim.EARC, new Arc2D.Double(-9.0,-9.0,18.0,18.0,270.0,230.0,Arc2D.OPEN))); 60 Turn.add(new Instr(Prim.EARC, new Arc2D.Double(-20.0,-20.0,40.0,40.0,315.0,-280.0,Arc2D.OPEN))); 61 Path2D.Double p = new Path2D.Double(); p.moveTo(21.8,-7.0); p.lineTo(18.8,-18.2); p.lineTo(10.5,-10.0); p.closePath(); 62 p.moveTo(-12.9,0.7); p.lineTo(-1.7,-2.3); p.lineTo(-9.9,-10.5); p.closePath(); 63 Turn.add(new Instr(Prim.PGON, p)); 64 } 65 private static final ArrayList<Instr> VHF = new ArrayList<Instr>(); 66 private static final ArrayList<Instr> Waterbike = new ArrayList<Instr>(); 67 private static final ArrayList<Instr> Waterski = new ArrayList<Instr>(); 68 private static final ArrayList<Instr> NoticeA = new ArrayList<Instr>(); 69 static { 70 NoticeA.add(new Instr(Prim.FILL, new Color(0xe80000))); 71 NoticeA.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 72 NoticeA.add(new Instr(Prim.FILL, Color.white)); 73 NoticeA.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-21,-21,42,42))); 74 NoticeA.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 75 NoticeA.add(new Instr(Prim.FILL, new Color(0xe80000))); 76 NoticeA.add(new Instr(Prim.LINE, new Line2D.Double(-25,-25,25,25))); 77 NoticeA.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 78 NoticeA.add(new Instr(Prim.FILL, Color.black)); 79 NoticeA.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 80 } 81 private static final ArrayList<Instr> NoticeB = new ArrayList<Instr>(); 82 static { 83 NoticeB.add(new Instr(Prim.FILL, new Color(0xe80000))); 84 NoticeB.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 85 NoticeB.add(new Instr(Prim.FILL, Color.white)); 86 NoticeB.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-21,-21,42,42))); 87 NoticeB.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 88 NoticeB.add(new Instr(Prim.FILL, Color.black)); 89 NoticeB.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 90 } 91 private static final ArrayList<Instr> NoticeE = new ArrayList<Instr>(); 92 static { 93 NoticeE.add(new Instr(Prim.FILL, new Color(0x0000a0))); 94 NoticeE.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 95 NoticeE.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 96 NoticeE.add(new Instr(Prim.FILL, Color.black)); 97 NoticeE.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 98 } 99 38 100 public static final ArrayList<Instr> Notice = new ArrayList<Instr>(); 39 public static final ArrayList<Instr> NoticeA = new ArrayList<Instr>();40 101 public static final ArrayList<Instr> NoticeA1 = new ArrayList<Instr>(); 102 static { 103 NoticeA1.add(new Instr(Prim.FILL, new Color(0xe80000))); 104 NoticeA1.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 105 NoticeA1.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 106 NoticeA1.add(new Instr(Prim.FILL, Color.white)); 107 NoticeA1.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-30,-10,60,20))); 108 NoticeA1.add(new Instr(Prim.FILL, Color.black)); 109 NoticeA1.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 110 } 41 111 public static final ArrayList<Instr> NoticeA1a = new ArrayList<Instr>(); 42 public static final ArrayList<Instr> Notice2 = new ArrayList<Instr>(); 43 public static final ArrayList<Instr> Notice3 = new ArrayList<Instr>(); 44 public static final ArrayList<Instr> Notice4 = new ArrayList<Instr>(); 45 public static final ArrayList<Instr> Notice4_1 = new ArrayList<Instr>(); 46 public static final ArrayList<Instr> Notice9 = new ArrayList<Instr>(); 47 public static final ArrayList<Instr> Notice10a = new ArrayList<Instr>(); 48 public static final ArrayList<Instr> Notice10b = new ArrayList<Instr>(); 49 public static final ArrayList<Instr> NoticeB = new ArrayList<Instr>(); 112 static { 113 NoticeA1a.add(new Instr(Prim.FILL, new Color(0xe80000))); 114 NoticeA1a.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60))); 115 NoticeA1a.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 116 NoticeA1a.add(new Instr(Prim.FILL, Color.white)); 117 NoticeA1a.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-29,-10,58,20))); 118 NoticeA1a.add(new Instr(Prim.FILL, Color.black)); 119 NoticeA1a.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-30,-30,60,60))); 120 } 121 public static final ArrayList<Instr> NoticeA2 = new ArrayList<Instr>(); 122 static { 123 NoticeA2.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 124 NoticeA2.add(new Instr(Prim.FILL, Color.black)); 125 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,23); p.lineTo(-10,0); p.lineTo(-6,0); p.lineTo(-12.5,-8); p.lineTo(-19,0); p.lineTo(-15,0); p.lineTo(-15,23); 126 p.closePath(); p.moveTo(10,8); p.lineTo(10,-15); p.lineTo(6,-15); p.lineTo(12.5,-23); p.lineTo(19,-15); p.lineTo(15,-15); p.lineTo(15,8); p.closePath(); 127 NoticeA2.add(new Instr(Prim.PGON, p)); 128 } 129 public static final ArrayList<Instr> NoticeA3 = new ArrayList<Instr>(); 130 static { 131 NoticeA3.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA2, 1.0, 0, 0, null, null))); 132 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,12); p.lineTo(-6,12); p.lineTo(-12.5,4); p.lineTo(-19,12); 133 p.closePath(); p.moveTo(10,-3); p.lineTo(6,-3); p.lineTo(12.5,-11); p.lineTo(19,-3); p.closePath(); 134 NoticeA3.add(new Instr(Prim.PGON, p)); 135 } 136 public static final ArrayList<Instr> NoticeA4 = new ArrayList<Instr>(); 137 static { 138 NoticeA4.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 139 NoticeA4.add(new Instr(Prim.FILL, Color.black)); 140 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,-15); p.lineTo(-10,8); p.lineTo(-6,8); p.lineTo(-12.5,16); p.lineTo(-19,8); p.lineTo(-15,8); p.lineTo(-15,-15); 141 p.closePath(); p.moveTo(10,15); p.lineTo(10,-8); p.lineTo(6,-8); p.lineTo(12.5,-16); p.lineTo(19,-8); p.lineTo(15,-8); p.lineTo(15,15); p.closePath(); 142 NoticeA4.add(new Instr(Prim.PGON, p)); 143 } 144 public static final ArrayList<Instr> NoticeA4_1 = new ArrayList<Instr>(); 145 static { 146 NoticeA4_1.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA4, 1.0, 0, 0, null, null))); 147 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,-4); p.lineTo(-6,-4); p.lineTo(-12.5,4); p.lineTo(-19,-4); 148 p.closePath(); p.moveTo(10,5); p.lineTo(6,5); p.lineTo(12.5,-3); p.lineTo(19,5); p.closePath(); 149 NoticeA4_1.add(new Instr(Prim.PGON, p)); 150 } 151 public static final ArrayList<Instr> NoticeA5 = new ArrayList<Instr>(); 152 static { 153 NoticeA5.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 154 NoticeA5.add(new Instr(Prim.FILL, Color.black)); 155 Path2D.Double p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD); p.moveTo(-5.3,14.6); p.lineTo(-5.3,4.0); p.lineTo(0.0,4.0); p.curveTo(4.2,4.0,7.4,3.5,9.4,0.0); 156 p.curveTo(11.4,-2.8,11.4,-7.2,9.4,-10.5); p.curveTo(7.4,-13.6,4.2,-14.0,0.0,-14.0); p.lineTo(-11.0,-14.0); p.lineTo(-11.0,14.6); p.closePath(); 157 p.moveTo(-5.3,-1.0); p.lineTo(0.0,-1.0); p.curveTo(6.5,-1.0,6.5,-9.0,0.0,-9.0); p.lineTo(-5.3,-9.0); p.closePath(); 158 NoticeA5.add(new Instr(Prim.PGON, p)); 159 } 160 public static final ArrayList<Instr> NoticeA5_1 = new ArrayList<Instr>(); 161 static { 162 NoticeA5_1.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 163 } 164 public static final ArrayList<Instr> NoticeA6 = new ArrayList<Instr>(); 165 static { 166 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 167 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.4, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))), null))); 168 } 169 public static final ArrayList<Instr> NoticeA7 = new ArrayList<Instr>(); 170 static { 171 NoticeA7.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 172 NoticeA7.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.Bollard, 1.0, 0, 0, null, null))); 173 } 174 public static final ArrayList<Instr> NoticeA8 = new ArrayList<Instr>(); 175 static { 176 NoticeA8.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 177 NoticeA8.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.Turn, 1.0, 0, 0, null, null))); 178 } 179 public static final ArrayList<Instr> NoticeA9 = new ArrayList<Instr>(); 180 static { 181 NoticeA9.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 182 NoticeA9.add(new Instr(Prim.STRK, new BasicStroke(7.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 183 NoticeA9.add(new Instr(Prim.FILL, Color.black)); 184 Path2D.Double p = new Path2D.Double(); p.moveTo(-23,10); p.curveTo(-11,10,-12,4,0,4); p.curveTo(12,4,11,10,23,10); 185 p.moveTo(-23,-3); p.curveTo(-11,-3,-12,-9,0,-9); p.curveTo(12,-9,11,-3,23,-3); 186 NoticeA9.add(new Instr(Prim.PLIN, p)); 187 } 188 public static final ArrayList<Instr> NoticeA10a = new ArrayList<Instr>(); 189 static { 190 NoticeA10a.add(new Instr(Prim.BBOX, new Rectangle(-30,-30,60,60))); 191 NoticeA10a.add(new Instr(Prim.FILL, Color.white)); 192 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(30,0); p.lineTo(0,30); p.closePath(); 193 NoticeA10a.add(new Instr(Prim.PGON, p)); 194 NoticeA10a.add(new Instr(Prim.FILL, new Color(0xe80000))); 195 p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(-30,0); p.lineTo(0,30); p.closePath(); 196 NoticeA10a.add(new Instr(Prim.PGON, p)); 197 NoticeA10a.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 198 NoticeA10a.add(new Instr(Prim.FILL, Color.black)); 199 p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(-30,0); p.lineTo(0,30); p.lineTo(30,0); p.closePath(); 200 NoticeA10a.add(new Instr(Prim.PLIN, p)); 201 } 202 public static final ArrayList<Instr> NoticeA10b = new ArrayList<Instr>(); 203 static { 204 NoticeA10b.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA10a, 1.0, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))), null))); 205 } 206 public static final ArrayList<Instr> NoticeA11= new ArrayList<Instr>(); 207 static { 208 NoticeA11.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 209 NoticeA11.add(new Instr(Prim.SYMB, new Symbols.Symbol(Notices.Motor, 1.0, 0, 0, null, null))); 210 } 50 211 public static final ArrayList<Instr> NoticeB2a = new ArrayList<Instr>(); 51 212 public static final ArrayList<Instr> NoticeB2b = new ArrayList<Instr>(); … … 66 227 public static final ArrayList<Instr> NoticeD2a = new ArrayList<Instr>(); 67 228 public static final ArrayList<Instr> NoticeD2b = new ArrayList<Instr>(); 68 public static final ArrayList<Instr> NoticeE = new ArrayList<Instr>();69 229 public static final ArrayList<Instr> NoticeE1 = new ArrayList<Instr>(); 70 230 public static final ArrayList<Instr> NoticeE2 = new ArrayList<Instr>();
Note:
See TracChangeset
for help on using the changeset viewer.