Changeset 30033 in osm for applications/editors/josm/plugins/smed2/src/symbols
- Timestamp:
- 2013-10-28T12:52:49+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/symbols
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/symbols/Areas.java
r30029 r30033 32 32 Cable.add(new Instr(Prim.PLIN, p)); 33 33 } 34 public static final Symbol CableDot = new Symbol(); 35 static { 36 CableDot.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-60,60,60))); 37 CableDot.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-40,20,20))); 38 } 39 public static final Symbol CableDash = new Symbol(); 40 static { 41 CableDash.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-60,60,60))); 42 CableDash.add(new Instr(Prim.STRK, new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 43 CableDash.add(new Instr(Prim.LINE, new Line2D.Double(0,-15,0,-45))); 44 } 45 public static final Symbol CableFlash = new Symbol(); 46 static { 47 CableFlash.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-60,60,60))); 48 Path2D.Double p = new Path2D.Double(); p.moveTo(-30,-25); p.lineTo(-10,-40); p.lineTo(10,-26); p.lineTo(30,-35); p.lineTo(10,-20); p.lineTo(-10,-34); p.closePath(); 49 CableFlash.add(new Instr(Prim.PGON, p)); 50 } 34 51 public static final Symbol LaneArrow = new Symbol(); 35 52 static { … … 44 61 static { 45 62 LineAnchor.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-60,60,90))); 46 LineAnchor.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))) , null)));63 LineAnchor.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.5, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0)))))); 47 64 } 48 65 public static final Symbol LinePlane = new Symbol(); 49 66 static { 50 67 LinePlane.add(new Instr(Prim.FILL, new Color(0xc480ff))); 51 LinePlane.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.Plane, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))) , null)));68 LinePlane.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.Plane, 0.5, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0)))))); 52 69 } 53 70 public static final Symbol MarineFarm = new Symbol(); -
applications/editors/josm/plugins/smed2/src/symbols/Beacons.java
r29198 r30033 12 12 import java.awt.BasicStroke; 13 13 import java.awt.Color; 14 import java.awt.geom.Arc2D; 15 import java.awt.geom.Ellipse2D; 16 import java.awt.geom.GeneralPath; 17 import java.awt.geom.Line2D; 18 import java.awt.geom.Path2D; 14 import java.awt.geom.*; 19 15 import java.util.EnumMap; 20 16 -
applications/editors/josm/plugins/smed2/src/symbols/Facilities.java
r29198 r30033 13 13 import java.awt.Color; 14 14 import java.awt.geom.*; 15 15 import java.util.EnumMap; 16 17 import s57.S57val.CatLMK; 18 import s57.S57val.CatSCF; 16 19 import symbols.Symbols.*; 17 20 … … 28 31 public static final Symbol Boatlift = new Symbol();//was Crane 29 32 static { 33 Boatlift.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 30 34 Boatlift.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 31 35 Boatlift.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); … … 36 40 public static final Symbol Boatyard = new Symbol(); 37 41 static { 42 Boatyard.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 38 43 Boatyard.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 39 44 Boatyard.add(new Instr(Prim.STRK, new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); … … 45 50 public static final Symbol Chandler = new Symbol(); 46 51 static { 52 Chandler.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 47 53 Chandler.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 48 54 Chandler.add(new Instr(Prim.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 55 61 public static final Symbol Fuel = new Symbol(); 56 62 static { 63 Fuel.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 57 64 Fuel.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 58 65 Fuel.add(new Instr(Prim.STRK, new BasicStroke(2.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 69 76 public static final Symbol Laundrette = new Symbol(); 70 77 static { 78 Laundrette.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 71 79 Laundrette.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 72 80 Laundrette.add(new Instr(Prim.STRK, new BasicStroke(1.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 80 88 public static final Symbol PumpOut = new Symbol(); 81 89 static { 90 PumpOut.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 82 91 PumpOut.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 83 92 PumpOut.add(new Instr(Prim.STRK, new BasicStroke(2.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); … … 96 105 public static final Symbol SailingClub = new Symbol(); 97 106 static { 107 SailingClub.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 98 108 SailingClub.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 99 109 SailingClub.add(new Instr(Prim.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 105 115 public static final Symbol Shower = new Symbol(); 106 116 static { 117 Shower.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 107 118 Shower.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 108 119 Shower.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 119 130 public static final Symbol Slipway = new Symbol(); 120 131 static { 132 Slipway.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 121 133 Slipway.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 122 134 Slipway.add(new Instr(Prim.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 136 148 public static final Symbol Toilet = new Symbol(); 137 149 static { 150 Toilet.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 138 151 Toilet.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 139 152 Toilet.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 153 166 public static final Symbol VisitorBerth = new Symbol(); 154 167 static { 168 VisitorBerth.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 155 169 VisitorBerth.add(new Instr(Prim.FILL, new Color(0xa30075))); 156 170 VisitorBerth.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-25,-25,50,50))); … … 177 191 VisitorMooring.add(new Instr(Prim.PGON, p)); 178 192 } 193 194 public static final EnumMap<CatSCF, Symbol> Cats = new EnumMap<CatSCF, Symbol>(CatSCF.class); 195 static { 196 Cats.put(CatSCF.SCF_BHST, Boatlift); Cats.put(CatSCF.SCF_BTYD, Boatyard); Cats.put(CatSCF.SCF_CHDR, Chandler); Cats.put(CatSCF.SCF_FUEL, Fuel); Cats.put(CatSCF.SCF_LAUN, Laundrette); 197 Cats.put(CatSCF.SCF_PMPO, PumpOut); Cats.put(CatSCF.SCF_CLUB, SailingClub); Cats.put(CatSCF.SCF_SHWR, Shower); Cats.put(CatSCF.SCF_SLPW, Slipway); Cats.put(CatSCF.SCF_WC, Toilet); 198 Cats.put(CatSCF.SCF_VBTH, VisitorBerth); Cats.put(CatSCF.SCF_VMOR, VisitorMooring); 199 } 179 200 } -
applications/editors/josm/plugins/smed2/src/symbols/Harbours.java
r30029 r30033 40 40 Bollard.add(new Instr(Prim.FILL, Color.black)); 41 41 Bollard.add(new Instr(Prim.ELPS, s)); 42 }43 public static final Symbol ClearV = new Symbol();44 static {45 ClearV.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));46 ClearV.add(new Instr(Prim.FILL, Color.white));47 ClearV.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));48 ClearV.add(new Instr(Prim.FILL, Color.black));49 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,-25,10,-25)));50 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-15)));51 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,25,10,25)));52 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,25,0,15)));53 42 } 54 43 public static final Symbol ContainerCrane = new Symbol(); … … 113 102 public static final Symbol HarbourMaster = new Symbol(); 114 103 static { 104 HarbourMaster.add(new Instr(Prim.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 115 105 HarbourMaster.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 116 HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(- 35,-50,70,100)));117 HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0. 6, 0, 0, null, null)));106 HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-24,-28,48,56))); 107 HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, null, null))); 118 108 } 119 109 public static final Symbol Hospital = new Symbol(); -
applications/editors/josm/plugins/smed2/src/symbols/Landmarks.java
r30027 r30033 11 11 12 12 import java.awt.BasicStroke; 13 import java.awt.Color; 14 import java.awt.geom.Arc2D; 15 import java.awt.geom.Ellipse2D; 16 import java.awt.geom.Line2D; 17 import java.awt.geom.Path2D; 18 import java.awt.geom.Rectangle2D; 13 import java.awt.geom.*; 19 14 import java.util.EnumMap; 20 15 -
applications/editors/josm/plugins/smed2/src/symbols/Notices.java
r30029 r30033 240 240 static { 241 241 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 242 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))) , null)));242 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0)))))); 243 243 } 244 244 public static final Symbol NoticeA7 = new Symbol(); … … 277 277 public static final Symbol NoticeA10b = new Symbol(); 278 278 static { 279 NoticeA10b.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA10a, 1.0, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))) , null)));279 NoticeA10b.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA10a, 1.0, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0)))))); 280 280 } 281 281 public static final Symbol NoticeA12 = new Symbol(); … … 512 512 public static final Symbol NoticeD2b = new Symbol(); 513 513 static { 514 NoticeD2b.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeD2a, 1.0, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))) , null)));514 NoticeD2b.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeD2a, 1.0, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0)))))); 515 515 } 516 516 public static final Symbol NoticeD3a = new Symbol(); … … 1039 1039 } 1040 1040 break; 1041 default: 1042 break; 1041 1043 } 1042 1044 return scheme; … … 1055 1057 symbol = NmkPpwbc.get(cat); 1056 1058 break; 1059 default: 1060 break; 1057 1061 } 1058 1062 return symbol; -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r30029 r30033 50 50 t = it; 51 51 } 52 public Delta(Handle ih) { 53 h = ih; 54 t = new AffineTransform(); 55 } 52 56 } 53 57 … … 110 114 public Scheme scheme; 111 115 112 public SubSymbol(Symbol iinstr, double iscale, double ix, double iy, Delta idelta,Scheme ischeme) {116 public SubSymbol(Symbol iinstr, double iscale, double ix, double iy, Scheme ischeme, Delta idelta) { 113 117 instr = iinstr; 114 118 scale = iscale; … … 120 124 } 121 125 122 public static void drawSymbol(Graphics2D g2, Symbol symbol, double scale, double x, double y, Delta dd,Scheme cs) {126 public static void drawSymbol(Graphics2D g2, Symbol symbol, double scale, double x, double y, Scheme cs, Delta dd) { 123 127 int pn = 0; 124 128 int cn = 0; … … 234 238 } 235 239 break; 240 default: 241 break; 236 242 } 237 243 } … … 270 276 case SYMB: 271 277 SubSymbol s = (SubSymbol) item.params; 272 drawSymbol(g2, s.instr, s.scale, s.x, s.y, s.delta,(s.scheme != null ? s.scheme : cs));278 drawSymbol(g2, s.instr, s.scale, s.x, s.y, (s.scheme != null ? s.scheme : cs), s.delta); 273 279 break; 274 280 case TEXT: … … 322 328 layout.draw(g2, (float)dx, (float)dy); 323 329 break; 330 default: 331 break; 324 332 } 325 333 }
Note:
See TracChangeset
for help on using the changeset viewer.