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 |
|
---|
10 | package symbols;
|
---|
11 |
|
---|
12 | import java.awt.BasicStroke;
|
---|
13 | import java.awt.Color;
|
---|
14 | import java.awt.Rectangle;
|
---|
15 | import java.awt.geom.Ellipse2D;
|
---|
16 | import java.awt.geom.Line2D;
|
---|
17 | import java.awt.geom.Path2D;
|
---|
18 | import java.util.ArrayList;
|
---|
19 |
|
---|
20 | import symbols.Symbols.Instr;
|
---|
21 | import symbols.Symbols.Prim;
|
---|
22 |
|
---|
23 | public class Topmarks {
|
---|
24 |
|
---|
25 | public static final ArrayList<Instr> FogSignal = new ArrayList<Instr>();
|
---|
26 | public static final ArrayList<Instr> LightFlare = new ArrayList<Instr>();
|
---|
27 | public static final ArrayList<Instr> Radar = new ArrayList<Instr>();
|
---|
28 | public static final ArrayList<Instr> TopBoard = new ArrayList<Instr>();
|
---|
29 | static {
|
---|
30 | TopBoard.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80)));
|
---|
31 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
32 | Path2D.Double p = new Path2D.Double(); p.moveTo(-19.0,-2.0); p.lineTo(-19.0,-39.0); p.lineTo(19.0,-39.0); p.lineTo(19.0,-2.0); p.closePath();
|
---|
33 | colours.add(new Instr(Prim.P1, p));
|
---|
34 | TopBoard.add(new Instr(Prim.COLR, colours));
|
---|
35 | TopBoard.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
36 | TopBoard.add(new Instr(Prim.FILL, Color.black));
|
---|
37 | p = new Path2D.Double(); p.moveTo(-19.0,-2.0); p.lineTo(-19.0,-39.0); p.lineTo(19.0,-39.0); p.lineTo(19.0,-2.0); p.closePath();
|
---|
38 | TopBoard.add(new Instr(Prim.PLIN, p));
|
---|
39 | }
|
---|
40 | public static final ArrayList<Instr> TopCan = new ArrayList<Instr>();
|
---|
41 | static {
|
---|
42 | TopCan.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80)));
|
---|
43 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
44 | Path2D.Double p = new Path2D.Double(); p.moveTo(-12.0,-15.0); p.lineTo(-12.0,-48.0); p.lineTo(12.0,-48.0); p.lineTo(12.0,-15.0); p.closePath();
|
---|
45 | colours.add(new Instr(Prim.P1, p));
|
---|
46 | TopCan.add(new Instr(Prim.COLR, colours));
|
---|
47 | TopCan.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
48 | TopCan.add(new Instr(Prim.FILL, Color.black));
|
---|
49 | TopCan.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
50 | p = new Path2D.Double(); p.moveTo(-12.0,-15.0); p.lineTo(-12.0,-48.0); p.lineTo(12.0,-48.0); p.lineTo(12.0,-15.0); p.closePath();
|
---|
51 | TopCan.add(new Instr(Prim.PLIN, p));
|
---|
52 | }
|
---|
53 | public static final ArrayList<Instr> TopCone = new ArrayList<Instr>();
|
---|
54 | static {
|
---|
55 | TopCone.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80)));
|
---|
56 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
57 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
58 | colours.add(new Instr(Prim.P1, p));
|
---|
59 | TopCone.add(new Instr(Prim.COLR, colours));
|
---|
60 | TopCone.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
61 | TopCone.add(new Instr(Prim.FILL, Color.black));
|
---|
62 | TopCone.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
63 | p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
64 | TopCone.add(new Instr(Prim.PLIN, p));
|
---|
65 | }
|
---|
66 | public static final ArrayList<Instr> TopCross = new ArrayList<Instr>();
|
---|
67 | static {
|
---|
68 | TopCross.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
69 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
70 | Path2D.Double p = new Path2D.Double(); p.moveTo(-5.0,-15.0); p.lineTo(-5.0,-32.5); p.lineTo(-22.5,-32.5); p.lineTo(-22.5,-42.5); p.lineTo(-5.0,-42.5);
|
---|
71 | p.lineTo(-5.0,-60.0); p.lineTo(5.0,-60.0); p.lineTo(5.0,-42.5); p.lineTo(22.5,-42.5); p.lineTo(22.5,-32.5); p.lineTo(5.0,-32.5); p.lineTo(5.0,-15.0); p.closePath();
|
---|
72 | colours.add(new Instr(Prim.P1, p));
|
---|
73 | TopCross.add(new Instr(Prim.COLR, colours));
|
---|
74 | TopCross.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
75 | TopCross.add(new Instr(Prim.FILL, Color.black));
|
---|
76 | TopCross.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
77 | TopCross.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
78 | p = new Path2D.Double(); p.moveTo(-5.0,-15.0); p.lineTo(-5.0,-32.5); p.lineTo(-22.5,-32.5); p.lineTo(-22.5,-42.5); p.lineTo(-5.0,-42.5); p.lineTo(-5.0,-60.0);
|
---|
79 | p.lineTo(5.0,-60.0); p.lineTo(5.0,-42.5); p.lineTo(22.5,-42.5); p.lineTo(22.5,-32.5); p.lineTo(5.0,-32.5); p.lineTo(5.0,-15.0); p.closePath();
|
---|
80 | TopCross.add(new Instr(Prim.PLIN, p));
|
---|
81 | }
|
---|
82 | public static final ArrayList<Instr> TopEast = new ArrayList<Instr>();
|
---|
83 | static {
|
---|
84 | TopEast.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
85 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
86 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-80.0); p.lineTo(-15.0,-47.0); p.lineTo(15.0,-47.0); p.closePath();
|
---|
87 | colours.add(new Instr(Prim.P1, p));
|
---|
88 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
89 | colours.add(new Instr(Prim.P2, p));
|
---|
90 | TopEast.add(new Instr(Prim.COLR, colours));
|
---|
91 | TopEast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
92 | TopEast.add(new Instr(Prim.FILL, Color.black));
|
---|
93 | TopEast.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
94 | TopEast.add(new Instr(Prim.LINE, new Line2D.Double(0,-43,0,-47)));
|
---|
95 | TopEast.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
96 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
97 | p.moveTo(0.0,-80.0); p.lineTo(-15.0,-47.0); p.lineTo(15.0,-47.0); p.closePath();
|
---|
98 | TopEast.add(new Instr(Prim.PLIN, p));
|
---|
99 | }
|
---|
100 | public static final ArrayList<Instr> TopIsol = new ArrayList<Instr>();
|
---|
101 | static {
|
---|
102 | TopIsol.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
103 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
104 | Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-55.0); p.curveTo(-13.0, -72.3, 13.0, -72.3, 13.0,-55.0); p.curveTo(13.0, -37.7, -13.0, -37.7, -13.0,-55.0); p.closePath();
|
---|
105 | colours.add(new Instr(Prim.P1, p));
|
---|
106 | p = new Path2D.Double(); p.moveTo(-13.0,-28.0); p.curveTo(-13.0, -45.3, 13.0, -45.3, 13.0,-28.0); p.curveTo(13.0, -10.7, -13.0, -10.7, -13.0,-28.0); p.closePath();
|
---|
107 | colours.add(new Instr(Prim.P2, p));
|
---|
108 | TopIsol.add(new Instr(Prim.COLR, colours));
|
---|
109 | TopIsol.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
110 | TopIsol.add(new Instr(Prim.FILL, Color.black));
|
---|
111 | TopIsol.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
112 | TopIsol.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
113 | TopIsol.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-13,-41,26,26)));
|
---|
114 | TopIsol.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-13,-68,26,26)));
|
---|
115 | }
|
---|
116 | public static final ArrayList<Instr> TopMooring = new ArrayList<Instr>();
|
---|
117 | static {
|
---|
118 | TopMooring.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
119 | TopMooring.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
120 | TopMooring.add(new Instr(Prim.FILL, Color.black));
|
---|
121 | TopMooring.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-1.5,-6,3,3)));
|
---|
122 | TopMooring.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-8.5,-25,17,17)));
|
---|
123 | }
|
---|
124 | public static final ArrayList<Instr> TopNorth = new ArrayList<Instr>();
|
---|
125 | static {
|
---|
126 | TopNorth.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
127 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
128 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-78.0); p.lineTo(-15.0,-45.0); p.lineTo(15.0,-45.0); p.closePath();
|
---|
129 | colours.add(new Instr(Prim.P1, p));
|
---|
130 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
131 | colours.add(new Instr(Prim.P2, p));
|
---|
132 | TopNorth.add(new Instr(Prim.COLR, colours));
|
---|
133 | TopNorth.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
134 | TopNorth.add(new Instr(Prim.FILL, Color.black));
|
---|
135 | TopNorth.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
136 | TopNorth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
137 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
138 | p.moveTo(0.0,-78.0); p.lineTo(-15.0,-45.0); p.lineTo(15.0,-45.0); p.closePath();
|
---|
139 | TopNorth.add(new Instr(Prim.PLIN, p));
|
---|
140 | }
|
---|
141 | public static final ArrayList<Instr> TopSouth = new ArrayList<Instr>();
|
---|
142 | static {
|
---|
143 | TopSouth.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
144 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
145 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath();
|
---|
146 | colours.add(new Instr(Prim.P1, p));
|
---|
147 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
148 | colours.add(new Instr(Prim.P2, p));
|
---|
149 | TopSouth.add(new Instr(Prim.COLR, colours));
|
---|
150 | TopSouth.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
151 | TopSouth.add(new Instr(Prim.FILL, Color.black));
|
---|
152 | TopSouth.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
153 | TopSouth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
154 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
155 | p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath();
|
---|
156 | TopSouth.add(new Instr(Prim.PLIN, p));
|
---|
157 | }
|
---|
158 | public static final ArrayList<Instr> TopSphere = new ArrayList<Instr>();
|
---|
159 | static {
|
---|
160 | TopSphere.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
161 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
162 | Path2D.Double p = new Path2D.Double(); p.moveTo(-14.0,-28.0); p.curveTo(-14.0,-46.7,14.0,-46.7,14.0,-28.0); p.curveTo(14.0,-9.3,-14.0,-9.3,-14.0,-28.0); p.closePath();
|
---|
163 | colours.add(new Instr(Prim.P1, p));
|
---|
164 | TopSphere.add(new Instr(Prim.COLR, colours));
|
---|
165 | TopSphere.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
166 | TopSphere.add(new Instr(Prim.FILL, Color.black));
|
---|
167 | TopSphere.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
168 | TopSphere.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
169 | TopSphere.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-14,-42,28,28)));
|
---|
170 | }
|
---|
171 | public static final ArrayList<Instr> TopSquare = new ArrayList<Instr>();
|
---|
172 | static {
|
---|
173 | TopSquare.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80)));
|
---|
174 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
175 | Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-1.0); p.lineTo(-13.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath();
|
---|
176 | colours.add(new Instr(Prim.P1, p));
|
---|
177 | TopSquare.add(new Instr(Prim.COLR, colours));
|
---|
178 | TopSquare.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
179 | TopSquare.add(new Instr(Prim.FILL, Color.black));
|
---|
180 | p = new Path2D.Double(); p.moveTo(-13.0,-1.0); p.lineTo(-13.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath();
|
---|
181 | TopSquare.add(new Instr(Prim.PLIN, p));
|
---|
182 | }
|
---|
183 | public static final ArrayList<Instr> TopTriangle = new ArrayList<Instr>();
|
---|
184 | static {
|
---|
185 | TopTriangle.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80)));
|
---|
186 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
187 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath();
|
---|
188 | colours.add(new Instr(Prim.P1, p));
|
---|
189 | TopTriangle.add(new Instr(Prim.COLR, colours));
|
---|
190 | TopTriangle.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
191 | TopTriangle.add(new Instr(Prim.FILL, Color.black));
|
---|
192 | p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath();
|
---|
193 | TopTriangle.add(new Instr(Prim.PLIN, p));
|
---|
194 | }
|
---|
195 | public static final ArrayList<Instr> TopWest = new ArrayList<Instr>();
|
---|
196 | static {
|
---|
197 | TopWest.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
198 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
199 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath();
|
---|
200 | colours.add(new Instr(Prim.P1, p));
|
---|
201 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
202 | colours.add(new Instr(Prim.P2, p));
|
---|
203 | TopWest.add(new Instr(Prim.COLR, colours));
|
---|
204 | TopWest.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
205 | TopWest.add(new Instr(Prim.FILL, Color.black));
|
---|
206 | TopWest.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
207 | TopWest.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
208 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
209 | p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath();
|
---|
210 | TopWest.add(new Instr(Prim.PLIN, p));
|
---|
211 | }
|
---|
212 | public static final ArrayList<Instr> TopX = new ArrayList<Instr>();
|
---|
213 | static {
|
---|
214 | TopX.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80)));
|
---|
215 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
216 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-27.7); p.lineTo(-12.4,-15.7); p.lineTo(-19.3,-22.6); p.lineTo(-7.3,-35.0); p.lineTo(-19.3,-47.3);
|
---|
217 | p.lineTo(-12.4,-54.2); p.lineTo(0.0,-42.4); p.lineTo(12.4,-54.2); p.lineTo(19.3,-47.3); p.lineTo(7.3,-35.0); p.lineTo(19.3,-22.6); p.lineTo(12.4,-15.7); p.closePath();
|
---|
218 | colours.add(new Instr(Prim.P1, p));
|
---|
219 | TopX.add(new Instr(Prim.COLR, colours));
|
---|
220 | TopX.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
221 | TopX.add(new Instr(Prim.FILL, Color.black));
|
---|
222 | TopX.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-27)));
|
---|
223 | TopX.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
224 | p = new Path2D.Double(); p.moveTo(0.0,-27.7); p.lineTo(-12.4,-15.7); p.lineTo(-19.3,-22.6); p.lineTo(-7.3,-35.0); p.lineTo(-19.3,-47.3); p.lineTo(-12.4,-54.2); p.lineTo(0.0,-42.4);
|
---|
225 | p.lineTo(12.4,-54.2); p.lineTo(19.3,-47.3); p.lineTo(7.3,-35.0); p.lineTo(19.3,-22.6); p.lineTo(12.4,-15.7); p.closePath();
|
---|
226 | TopX.add(new Instr(Prim.PLIN, p));
|
---|
227 | }
|
---|
228 | }
|
---|