source: osm/applications/editors/josm/plugins/smed2/src/symbols/Harbours.java@ 29126

Last change on this file since 29126 was 29126, checked in by malcolmh, 12 years ago

save

File size: 10.3 KB
Line 
1/* Copyright 2012 Malcolm Herring
2 *
3 * This is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License.
6 *
7 * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
8 */
9
10package symbols;
11
12import java.awt.BasicStroke;
13import java.awt.Color;
14import java.awt.Rectangle;
15import java.awt.geom.Arc2D;
16import java.awt.geom.Ellipse2D;
17import java.awt.geom.Line2D;
18import java.awt.geom.Path2D;
19import java.awt.geom.Rectangle2D;
20import java.util.ArrayList;
21
22import symbols.Symbols.Instr;
23import symbols.Symbols.Prim;
24
25public class Harbours {
26 public static final ArrayList<Instr> Anchor = new ArrayList<Instr>();
27 static {
28 Anchor.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120)));
29 Anchor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
30 Anchor.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-59,20,20)));
31 Path2D.Double p = new Path2D.Double(); p.moveTo(23.0,-40.0); p.lineTo(23.0,-30.0); p.lineTo(6.0,-30.0); p.lineTo(7.0,31.0); p.quadTo(21.0,29.0,31.0,22.0);
32 p.lineTo(27.0,18.0); p.lineTo(52.0,0.0); p.lineTo(45.0,35.0); p.lineTo(37.0,28.0); p.quadTo(25.0,39.0,7.0,43.0); p.lineTo(6.0,51.0);
33 p.lineTo(-6.0,51.0); p.lineTo(-7.0,43.0); p.quadTo(-25.0,39.0,-37.0,28.0); p.lineTo(-45.0,35.0); p.lineTo(-52.0,0.0); p.lineTo(-27.0,18.0);
34 p.lineTo(-31.0,22.0); p.quadTo(-21.0,29.0,-7.0,31.0); p.lineTo(-6.0,-30.0); p.lineTo(-23.0,-30.0); p.lineTo(-23.0,-40.0); p.closePath();
35 Anchor.add(new Instr(Prim.PGON, p));
36 }
37 public static final ArrayList<Instr> Yacht = new ArrayList<Instr>();
38 static {
39 Yacht.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
40 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);
41 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();
42 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();
43 Yacht.add(new Instr(Prim.PGON, p));
44 }
45 public static final ArrayList<Instr> Anchorage = new ArrayList<Instr>();
46 static {
47 Anchorage.add(new Instr(Prim.FILL, new Color(0xa30075)));
48 Anchorage.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
49 }
50 public static final ArrayList<Instr> AnchorBerth = new ArrayList<Instr>();
51 static {
52 AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchorage, 1.0, 0, 0, null, null)));
53 AnchorBerth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
54 AnchorBerth.add(new Instr(Prim.FILL, Color.white));
55 Ellipse2D.Double s = new Ellipse2D.Double(-25,-25,50,50);
56 AnchorBerth.add(new Instr(Prim.RSHP, s));
57 AnchorBerth.add(new Instr(Prim.FILL, new Color(0xa30075)));
58 AnchorBerth.add(new Instr(Prim.ELPS, s));
59 }
60 public static final ArrayList<Instr> Bollard = new ArrayList<Instr>();
61 static {
62 Bollard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
63 Bollard.add(new Instr(Prim.FILL, Color.white));
64 Ellipse2D.Double s = new Ellipse2D.Double(-10,-10,20,20);
65 Bollard.add(new Instr(Prim.RSHP, s));
66 Bollard.add(new Instr(Prim.FILL, Color.black));
67 Bollard.add(new Instr(Prim.ELPS, s));
68 }
69 public static final ArrayList<Instr> ClearV = new ArrayList<Instr>();
70 static {
71 ClearV.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
72 ClearV.add(new Instr(Prim.FILL, Color.white));
73 ClearV.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));
74 ClearV.add(new Instr(Prim.FILL, Color.black));
75 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,-25,10,-25)));
76 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-15)));
77 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,25,10,25)));
78 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,25,0,15)));
79 }
80 public static final ArrayList<Instr> ContainerCrane = new ArrayList<Instr>();
81 static {
82 ContainerCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
83 ContainerCrane.add(new Instr(Prim.FILL, Color.black));
84 ContainerCrane.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-15,-65,30,100)));
85 ContainerCrane.add(new Instr(Prim.RECT, new Rectangle2D.Double(-40,-12.5,80,25)));
86 }
87 public static final ArrayList<Instr> DeviationDolphin = new ArrayList<Instr>();
88 static {
89 DeviationDolphin.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
90 DeviationDolphin.add(new Instr(Prim.FILL, Color.black));
91 Path2D.Double p = new Path2D.Double(); p.moveTo(-30.0,0.0); p.lineTo(30.0,0.0); p.moveTo(0.0,0.0); p.lineTo(0.0,-40.0);
92 p.moveTo(-20.0,0.0); p.lineTo(-15.0,-32.0); p.lineTo(15.0,-32.0); p.lineTo(20.0,0.0);
93 DeviationDolphin.add(new Instr(Prim.PLIN, p));
94 }
95 public static final ArrayList<Instr> DistanceI = new ArrayList<Instr>();
96 static {
97 DistanceI.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
98 DistanceI.add(new Instr(Prim.FILL, Color.black));
99 DistanceI.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
100 }
101 public static final ArrayList<Instr> DistanceU = new ArrayList<Instr>();
102 static {
103 DistanceU.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
104 DistanceU.add(new Instr(Prim.FILL, new Color(0xa30075)));
105 DistanceU.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
106 }
107 public static final ArrayList<Instr> Dolphin = new ArrayList<Instr>();
108 static {
109 Dolphin.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
110 Dolphin.add(new Instr(Prim.FILL, new Color(0xffd400)));
111 Path2D.Double p = new Path2D.Double(); p.moveTo(3.8,-9.2); p.lineTo(9.2,-3.8); p.lineTo(9.2,3.8); p.lineTo(3.8,9.2);
112 p.lineTo(-3.8,9.2); p.lineTo(-9.2,3.8); p.lineTo(-9.2,-3.8); p.lineTo(-3.8,-9.2); p.closePath();
113 Dolphin.add(new Instr(Prim.PGON, p));
114 Dolphin.add(new Instr(Prim.FILL, Color.black));
115 Dolphin.add(new Instr(Prim.PLIN, p));
116 }
117 public static final ArrayList<Instr> Harbour = new ArrayList<Instr>();
118 static {
119 Harbour.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
120 Harbour.add(new Instr(Prim.FILL, new Color(0xa30075)));
121 Harbour.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-75,-75,150,150)));
122 Harbour.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
123 }
124 public static final ArrayList<Instr> HarbourMaster = new ArrayList<Instr>();
125 static {
126 HarbourMaster.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
127 HarbourMaster.add(new Instr(Prim.FILL, Color.black));
128 HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-35,-50,70,100)));
129 HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.6, 0, 0, null, null)));
130 }
131 public static final ArrayList<Instr> LandingSteps = new ArrayList<Instr>();
132 static {
133 LandingSteps.add(new Instr(Prim.FILL, new Color(0xa30075)));
134 Path2D.Double p = new Path2D.Double(); p.moveTo(-20,-10); p.lineTo(10,20); p.lineTo(20,20); p.lineTo(20,10);
135 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();
136 LandingSteps.add(new Instr(Prim.PGON, p));
137 }
138 public static final ArrayList<Instr> Lock_Gate = new ArrayList<Instr>();
139 public static final ArrayList<Instr> Lock = new ArrayList<Instr>();
140 public static final ArrayList<Instr> Marina = new ArrayList<Instr>();
141 static {
142 Marina.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
143 Marina.add(new Instr(Prim.FILL, new Color(0xa30075)));
144 Marina.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
145 Marina.add(new Instr(Prim.EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN)));
146 }
147 public static final ArrayList<Instr> MarinaNF = new ArrayList<Instr>();
148 static {
149 MarinaNF.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
150 MarinaNF.add(new Instr(Prim.FILL, new Color(0xa30075)));
151 MarinaNF.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
152 }
153 public static final ArrayList<Instr> PortCrane = new ArrayList<Instr>();
154 static {
155 PortCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
156 PortCrane.add(new Instr(Prim.FILL, Color.black));
157 PortCrane.add(new Instr(Prim.EARC, new Arc2D.Double(-36.0,-36.0,72.0,72.0,70.0,-320.0,Arc2D.OPEN)));
158 PortCrane.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-60)));
159 }
160 public static final ArrayList<Instr> Post = new ArrayList<Instr>();
161 static {
162 Post.add(new Instr(Prim.FILL, Color.black));
163 Post.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-10,20,20)));
164 }
165 public static final ArrayList<Instr> SignalStation = new ArrayList<Instr>();
166 static {
167 SignalStation.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
168 SignalStation.add(new Instr(Prim.FILL, Color.black));
169 SignalStation.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-25,-25,50,50)));
170 SignalStation.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
171 }
172 public static final ArrayList<Instr> TideGauge = new ArrayList<Instr>();
173 static {
174 TideGauge.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
175 TideGauge.add(new Instr(Prim.FILL, Color.black));
176 TideGauge.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
177 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,-30,0)));
178 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(10,0,30,0)));
179 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-80)));
180 TideGauge.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
181 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-25,15,-25)));
182 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-25,-45,25,-45)));
183 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-65,15,-65)));
184 }
185}
Note: See TracBrowser for help on using the repository browser.