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

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

save

File size: 10.2 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.geom.Arc2D;
15import java.awt.geom.Ellipse2D;
16import java.awt.geom.Line2D;
17import java.awt.geom.Path2D;
18import java.awt.geom.Rectangle2D;
19import java.util.ArrayList;
20
21import symbols.Symbols.Instr;
22import symbols.Symbols.Prim;
23
24public class Harbours {
25 public static final ArrayList<Instr> Anchor = new ArrayList<Instr>();
26 static {
27 Anchor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
28 Anchor.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-59,20,20)));
29 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);
30 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);
31 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);
32 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();
33 Anchor.add(new Instr(Prim.PGON, p));
34 }
35 public static final ArrayList<Instr> Yacht = new ArrayList<Instr>();
36 static {
37 Yacht.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
38 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);
39 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();
40 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();
41 Yacht.add(new Instr(Prim.PGON, p));
42 }
43 public static final ArrayList<Instr> Anchorage = new ArrayList<Instr>();
44 static {
45 Anchorage.add(new Instr(Prim.FILL, new Color(0xa30075)));
46 Anchorage.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
47 }
48 public static final ArrayList<Instr> AnchorBerth = new ArrayList<Instr>();
49 static {
50 AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchorage, 1.0, 0, 0, null, null)));
51 AnchorBerth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
52 AnchorBerth.add(new Instr(Prim.FILL, Color.white));
53 Ellipse2D.Double s = new Ellipse2D.Double(-25,-25,50,50);
54 AnchorBerth.add(new Instr(Prim.RSHP, s));
55 AnchorBerth.add(new Instr(Prim.FILL, new Color(0xa30075)));
56 AnchorBerth.add(new Instr(Prim.ELPS, s));
57 }
58 public static final ArrayList<Instr> Bollard = new ArrayList<Instr>();
59 static {
60 Bollard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
61 Bollard.add(new Instr(Prim.FILL, Color.white));
62 Ellipse2D.Double s = new Ellipse2D.Double(-10,-10,20,20);
63 Bollard.add(new Instr(Prim.RSHP, s));
64 Bollard.add(new Instr(Prim.FILL, Color.black));
65 Bollard.add(new Instr(Prim.ELPS, s));
66 }
67 public static final ArrayList<Instr> ClearV = new ArrayList<Instr>();
68 static {
69 ClearV.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
70 ClearV.add(new Instr(Prim.FILL, Color.white));
71 ClearV.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));
72 ClearV.add(new Instr(Prim.FILL, Color.black));
73 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,-25,10,-25)));
74 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-15)));
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 }
78 public static final ArrayList<Instr> ContainerCrane = new ArrayList<Instr>();
79 static {
80 ContainerCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
81 ContainerCrane.add(new Instr(Prim.FILL, Color.black));
82 ContainerCrane.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-15,-65,30,100)));
83 ContainerCrane.add(new Instr(Prim.RECT, new Rectangle2D.Double(-40,-12.5,80,25)));
84 }
85 public static final ArrayList<Instr> DeviationDolphin = new ArrayList<Instr>();
86 static {
87 DeviationDolphin.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
88 DeviationDolphin.add(new Instr(Prim.FILL, Color.black));
89 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);
90 p.moveTo(-20.0,0.0); p.lineTo(-15.0,-32.0); p.lineTo(15.0,-32.0); p.lineTo(20.0,0.0);
91 DeviationDolphin.add(new Instr(Prim.PLIN, p));
92 }
93 public static final ArrayList<Instr> DistanceI = new ArrayList<Instr>();
94 static {
95 DistanceI.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
96 DistanceI.add(new Instr(Prim.FILL, Color.black));
97 DistanceI.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
98 }
99 public static final ArrayList<Instr> DistanceU = new ArrayList<Instr>();
100 static {
101 DistanceU.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
102 DistanceU.add(new Instr(Prim.FILL, new Color(0xa30075)));
103 DistanceU.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
104 }
105 public static final ArrayList<Instr> Dolphin = new ArrayList<Instr>();
106 static {
107 Dolphin.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
108 Dolphin.add(new Instr(Prim.FILL, new Color(0xffd400)));
109 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);
110 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();
111 Dolphin.add(new Instr(Prim.PGON, p));
112 Dolphin.add(new Instr(Prim.FILL, Color.black));
113 Dolphin.add(new Instr(Prim.PLIN, p));
114 }
115 public static final ArrayList<Instr> Harbour = new ArrayList<Instr>();
116 static {
117 Harbour.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
118 Harbour.add(new Instr(Prim.FILL, new Color(0xa30075)));
119 Harbour.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-75,-75,150,150)));
120 Harbour.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
121 }
122 public static final ArrayList<Instr> HarbourMaster = new ArrayList<Instr>();
123 static {
124 HarbourMaster.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
125 HarbourMaster.add(new Instr(Prim.FILL, Color.black));
126 HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-35,-50,70,100)));
127 HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.6, 0, 0, null, null)));
128 }
129 public static final ArrayList<Instr> LandingSteps = new ArrayList<Instr>();
130 static {
131 LandingSteps.add(new Instr(Prim.FILL, new Color(0xa30075)));
132 Path2D.Double p = new Path2D.Double(); p.moveTo(-20,-10); p.lineTo(10,20); p.lineTo(20,20); p.lineTo(20,10);
133 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();
134 LandingSteps.add(new Instr(Prim.PGON, p));
135 }
136 public static final ArrayList<Instr> Lock_Gate = new ArrayList<Instr>();
137 public static final ArrayList<Instr> Lock = new ArrayList<Instr>();
138 public static final ArrayList<Instr> Marina = new ArrayList<Instr>();
139 static {
140 Marina.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
141 Marina.add(new Instr(Prim.FILL, new Color(0xa30075)));
142 Marina.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
143 Marina.add(new Instr(Prim.EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN)));
144 }
145 public static final ArrayList<Instr> MarinaNF = new ArrayList<Instr>();
146 static {
147 MarinaNF.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
148 MarinaNF.add(new Instr(Prim.FILL, new Color(0xa30075)));
149 MarinaNF.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
150 }
151 public static final ArrayList<Instr> PortCrane = new ArrayList<Instr>();
152 static {
153 PortCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
154 PortCrane.add(new Instr(Prim.FILL, Color.black));
155 PortCrane.add(new Instr(Prim.EARC, new Arc2D.Double(-36.0,-36.0,72.0,72.0,70.0,-320.0,Arc2D.OPEN)));
156 PortCrane.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-60)));
157 }
158 public static final ArrayList<Instr> Post = new ArrayList<Instr>();
159 static {
160 Post.add(new Instr(Prim.FILL, Color.black));
161 Post.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-10,20,20)));
162 }
163 public static final ArrayList<Instr> SignalStation = new ArrayList<Instr>();
164 static {
165 SignalStation.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
166 SignalStation.add(new Instr(Prim.FILL, Color.black));
167 SignalStation.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-25,-25,50,50)));
168 SignalStation.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
169 }
170 public static final ArrayList<Instr> TideGauge = new ArrayList<Instr>();
171 static {
172 TideGauge.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
173 TideGauge.add(new Instr(Prim.FILL, Color.black));
174 TideGauge.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
175 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,-30,0)));
176 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(10,0,30,0)));
177 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-80)));
178 TideGauge.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
179 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-25,15,-25)));
180 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-25,-45,25,-45)));
181 TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-65,15,-65)));
182 }
183}
Note: See TracBrowser for help on using the repository browser.