1 | /* Copyright 2014 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.geom.*;
|
---|
15 | import java.util.EnumMap;
|
---|
16 |
|
---|
17 | import s57.S57val.*;
|
---|
18 | import symbols.Symbols.*;
|
---|
19 |
|
---|
20 | public class Topmarks {
|
---|
21 |
|
---|
22 | public static final Symbol TopBesom = new Symbol();
|
---|
23 | static {
|
---|
24 | TopBesom.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
25 | TopBesom.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
26 | TopBesom.add(new Instr(Form.FILL, Color.black));
|
---|
27 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,0.0); p.lineTo(0.0,-30.0); p.lineTo(15.0,0.0); p.moveTo(0.0,0.0); p.lineTo(0.0,-28.0);
|
---|
28 | TopBesom.add(new Instr(Form.PLIN, p));
|
---|
29 | }
|
---|
30 | public static final Symbol TopIBesom = new Symbol();
|
---|
31 | static {
|
---|
32 | TopIBesom.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
33 | TopIBesom.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
34 | TopIBesom.add(new Instr(Form.FILL, Color.black));
|
---|
35 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-30.0); p.lineTo(0.0,0.0); p.lineTo(15.0,-30.0);
|
---|
36 | TopIBesom.add(new Instr(Form.PLIN, p));
|
---|
37 | }
|
---|
38 | public static final Symbol TopBoard = new Symbol();
|
---|
39 | static {
|
---|
40 | TopBoard.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
41 | Symbol colours = new Symbol();
|
---|
42 | 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();
|
---|
43 | colours.add(new Instr(Form.P1, p));
|
---|
44 | TopBoard.add(new Instr(Form.COLR, colours));
|
---|
45 | TopBoard.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
46 | TopBoard.add(new Instr(Form.FILL, Color.black));
|
---|
47 | 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();
|
---|
48 | TopBoard.add(new Instr(Form.PLIN, p));
|
---|
49 | }
|
---|
50 | public static final Symbol TopCan = new Symbol();
|
---|
51 | static {
|
---|
52 | TopCan.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
53 | Symbol colours = new Symbol();
|
---|
54 | 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();
|
---|
55 | colours.add(new Instr(Form.P1, p));
|
---|
56 | TopCan.add(new Instr(Form.COLR, colours));
|
---|
57 | TopCan.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
58 | TopCan.add(new Instr(Form.FILL, Color.black));
|
---|
59 | TopCan.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
60 | 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();
|
---|
61 | TopCan.add(new Instr(Form.PLIN, p));
|
---|
62 | }
|
---|
63 | public static final Symbol TopCone = new Symbol();
|
---|
64 | static {
|
---|
65 | TopCone.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
66 | Symbol colours = new Symbol();
|
---|
67 | 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();
|
---|
68 | colours.add(new Instr(Form.P1, p));
|
---|
69 | TopCone.add(new Instr(Form.COLR, colours));
|
---|
70 | TopCone.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
71 | TopCone.add(new Instr(Form.FILL, Color.black));
|
---|
72 | TopCone.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
73 | p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
74 | TopCone.add(new Instr(Form.PLIN, p));
|
---|
75 | }
|
---|
76 | public static final Symbol TopCross = new Symbol();
|
---|
77 | static {
|
---|
78 | TopCross.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
79 | Symbol colours = new Symbol();
|
---|
80 | 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);
|
---|
81 | 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();
|
---|
82 | colours.add(new Instr(Form.P1, p));
|
---|
83 | TopCross.add(new Instr(Form.COLR, colours));
|
---|
84 | TopCross.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
85 | TopCross.add(new Instr(Form.FILL, Color.black));
|
---|
86 | TopCross.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
87 | TopCross.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
88 | 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);
|
---|
89 | 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();
|
---|
90 | TopCross.add(new Instr(Form.PLIN, p));
|
---|
91 | }
|
---|
92 | public static final Symbol TopEast = new Symbol();
|
---|
93 | static {
|
---|
94 | TopEast.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
95 | Symbol colours = new Symbol();
|
---|
96 | 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();
|
---|
97 | colours.add(new Instr(Form.P1, p));
|
---|
98 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
99 | colours.add(new Instr(Form.P2, p));
|
---|
100 | TopEast.add(new Instr(Form.COLR, colours));
|
---|
101 | TopEast.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
102 | TopEast.add(new Instr(Form.FILL, Color.black));
|
---|
103 | TopEast.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
104 | TopEast.add(new Instr(Form.LINE, new Line2D.Double(0,-43,0,-47)));
|
---|
105 | TopEast.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
106 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
107 | p.moveTo(0.0,-80.0); p.lineTo(-15.0,-47.0); p.lineTo(15.0,-47.0); p.closePath();
|
---|
108 | TopEast.add(new Instr(Form.PLIN, p));
|
---|
109 | }
|
---|
110 | public static final Symbol TopIcone = new Symbol();
|
---|
111 | static {
|
---|
112 | TopIcone.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
113 | Symbol colours = new Symbol();
|
---|
114 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-45.0); p.lineTo(0.0,-15.0); p.lineTo(15.0,-45.0); p.closePath();
|
---|
115 | colours.add(new Instr(Form.P1, p));
|
---|
116 | TopIcone.add(new Instr(Form.COLR, colours));
|
---|
117 | TopIcone.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
118 | TopIcone.add(new Instr(Form.FILL, Color.black));
|
---|
119 | TopIcone.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
120 | p = new Path2D.Double(); p.moveTo(-15.0,-45.0); p.lineTo(0.0,-15.0); p.lineTo(15.0,-45.0); p.closePath();
|
---|
121 | TopIcone.add(new Instr(Form.PLIN, p));
|
---|
122 | }
|
---|
123 | public static final Symbol TopIsol = new Symbol();
|
---|
124 | static {
|
---|
125 | TopIsol.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
126 | Symbol colours = new Symbol();
|
---|
127 | 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();
|
---|
128 | colours.add(new Instr(Form.P1, p));
|
---|
129 | 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();
|
---|
130 | colours.add(new Instr(Form.P2, p));
|
---|
131 | TopIsol.add(new Instr(Form.COLR, colours));
|
---|
132 | TopIsol.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
133 | TopIsol.add(new Instr(Form.FILL, Color.black));
|
---|
134 | TopIsol.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
135 | TopIsol.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
136 | TopIsol.add(new Instr(Form.ELPS, new Ellipse2D.Double(-13,-41,26,26)));
|
---|
137 | TopIsol.add(new Instr(Form.ELPS, new Ellipse2D.Double(-13,-68,26,26)));
|
---|
138 | }
|
---|
139 | public static final Symbol TopMooring = new Symbol();
|
---|
140 | static {
|
---|
141 | TopMooring.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
142 | TopMooring.add(new Instr(Form.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
143 | TopMooring.add(new Instr(Form.FILL, Color.black));
|
---|
144 | TopMooring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-1.5,-6,3,3)));
|
---|
145 | TopMooring.add(new Instr(Form.ELPS, new Ellipse2D.Double(-8.5,-25,17,17)));
|
---|
146 | }
|
---|
147 | public static final Symbol TopNorth = new Symbol();
|
---|
148 | static {
|
---|
149 | TopNorth.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
150 | Symbol colours = new Symbol();
|
---|
151 | 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();
|
---|
152 | colours.add(new Instr(Form.P1, p));
|
---|
153 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
154 | colours.add(new Instr(Form.P2, p));
|
---|
155 | TopNorth.add(new Instr(Form.COLR, colours));
|
---|
156 | TopNorth.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
157 | TopNorth.add(new Instr(Form.FILL, Color.black));
|
---|
158 | TopNorth.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
159 | TopNorth.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
160 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
161 | p.moveTo(0.0,-78.0); p.lineTo(-15.0,-45.0); p.lineTo(15.0,-45.0); p.closePath();
|
---|
162 | TopNorth.add(new Instr(Form.PLIN, p));
|
---|
163 | }
|
---|
164 | public static final Symbol TopSouth = new Symbol();
|
---|
165 | static {
|
---|
166 | TopSouth.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
167 | Symbol colours = new Symbol();
|
---|
168 | 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();
|
---|
169 | colours.add(new Instr(Form.P1, p));
|
---|
170 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
171 | colours.add(new Instr(Form.P2, p));
|
---|
172 | TopSouth.add(new Instr(Form.COLR, colours));
|
---|
173 | TopSouth.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
174 | TopSouth.add(new Instr(Form.FILL, Color.black));
|
---|
175 | TopSouth.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
176 | TopSouth.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
177 | p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath();
|
---|
178 | p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath();
|
---|
179 | TopSouth.add(new Instr(Form.PLIN, p));
|
---|
180 | }
|
---|
181 | public static final Symbol TopSphere = new Symbol();
|
---|
182 | static {
|
---|
183 | TopSphere.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
184 | Symbol colours = new Symbol();
|
---|
185 | 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();
|
---|
186 | colours.add(new Instr(Form.P1, p));
|
---|
187 | TopSphere.add(new Instr(Form.COLR, colours));
|
---|
188 | TopSphere.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
189 | TopSphere.add(new Instr(Form.FILL, Color.black));
|
---|
190 | TopSphere.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-15)));
|
---|
191 | TopSphere.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
192 | TopSphere.add(new Instr(Form.ELPS, new Ellipse2D.Double(-14,-42,28,28)));
|
---|
193 | }
|
---|
194 | public static final Symbol TopSquare = new Symbol();
|
---|
195 | static {
|
---|
196 | TopSquare.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
197 | Symbol colours = new Symbol();
|
---|
198 | 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();
|
---|
199 | colours.add(new Instr(Form.P1, p));
|
---|
200 | p = new Path2D.Double(); p.moveTo(-13.0,-15.0); p.lineTo(-13.0,-1.0); p.lineTo(13.0,-1.0); p.lineTo(13.0,-15.0); p.closePath();
|
---|
201 | colours.add(new Instr(Form.H2, p));
|
---|
202 | p = new Path2D.Double(); p.moveTo(-13.0,-19.3); p.lineTo(-13.0,-10.7); p.lineTo(13.0,-10.7); p.lineTo(13.0,-19.3); p.closePath();
|
---|
203 | colours.add(new Instr(Form.H3, p));
|
---|
204 | p = new Path2D.Double(); p.moveTo(0.0,-1.0); p.lineTo(0.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath();
|
---|
205 | colours.add(new Instr(Form.V2, p));
|
---|
206 | p = new Path2D.Double(); p.moveTo(-4.3,-1.0); p.lineTo(-4.3,-27.0); p.lineTo(4.3,-27.0); p.lineTo(4.3,-1.0); p.closePath();
|
---|
207 | colours.add(new Instr(Form.V3, p));
|
---|
208 | p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD);
|
---|
209 | 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();
|
---|
210 | p.moveTo(-8.0,-6.0); p.lineTo(-8.0,-22.0); p.lineTo(8.0,-22.0); p.lineTo(8.0,-6.0); p.closePath();
|
---|
211 | colours.add(new Instr(Form.B1, p));
|
---|
212 | TopSquare.add(new Instr(Form.COLR, colours));
|
---|
213 | TopSquare.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
214 | TopSquare.add(new Instr(Form.FILL, Color.black));
|
---|
215 | 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();
|
---|
216 | TopSquare.add(new Instr(Form.PLIN, p));
|
---|
217 | }
|
---|
218 | public static final Symbol TopRhombus = new Symbol();
|
---|
219 | static {
|
---|
220 | TopRhombus.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
221 | Symbol colours = new Symbol();
|
---|
222 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-29.0); p.lineTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
223 | colours.add(new Instr(Form.P1, p));
|
---|
224 | p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
225 | colours.add(new Instr(Form.H2, p));
|
---|
226 | p = new Path2D.Double(); p.moveTo(-10.0,-19.7); p.lineTo(-15.0,-15.0); p.lineTo(-10.0,-10.3); p.lineTo(10.0,-10.3); p.lineTo(15.0,-15.0); p.lineTo(10.0,-19.7); p.closePath();
|
---|
227 | colours.add(new Instr(Form.H3, p));
|
---|
228 | p = new Path2D.Double(); p.moveTo(0.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
229 | colours.add(new Instr(Form.V2, p));
|
---|
230 | p = new Path2D.Double(); p.moveTo(0.0,-29.0); p.lineTo(-5.0,-24.3); p.lineTo(-5.0,-5.7); p.lineTo(0.0,-1.0); p.lineTo(5.0,-5.7); p.lineTo(5.0,-24.3); p.closePath();
|
---|
231 | colours.add(new Instr(Form.V3, p));
|
---|
232 | p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD);
|
---|
233 | p.moveTo(0.0,-29.0); p.lineTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
234 | p.moveTo(0.0,-23.0); p.lineTo(-9.0,-15.0); p.lineTo(0.0,-7.0); p.lineTo(9.0,-15.0); p.closePath();
|
---|
235 | colours.add(new Instr(Form.B1, p));
|
---|
236 | TopRhombus.add(new Instr(Form.COLR, colours));
|
---|
237 | TopRhombus.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
238 | TopRhombus.add(new Instr(Form.FILL, Color.black));
|
---|
239 | p = new Path2D.Double(); p.moveTo(0.0,-29.0); p.lineTo(-15.0,-15.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-15.0); p.closePath();
|
---|
240 | TopRhombus.add(new Instr(Form.PLIN, p));
|
---|
241 | }
|
---|
242 | public static final Symbol TopTriangle = new Symbol();
|
---|
243 | static {
|
---|
244 | TopTriangle.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
245 | Symbol colours = new Symbol();
|
---|
246 | 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();
|
---|
247 | colours.add(new Instr(Form.P1, p));
|
---|
248 | p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD);
|
---|
249 | p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath();
|
---|
250 | p.moveTo(-10.0,-6.0); p.lineTo(0.0,-24.0); p.lineTo(10.0,-6.0); p.closePath();
|
---|
251 | colours.add(new Instr(Form.B1, p));
|
---|
252 | TopTriangle.add(new Instr(Form.COLR, colours));
|
---|
253 | TopTriangle.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
254 | TopTriangle.add(new Instr(Form.FILL, Color.black));
|
---|
255 | p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath();
|
---|
256 | TopTriangle.add(new Instr(Form.PLIN, p));
|
---|
257 | }
|
---|
258 | public static final Symbol TopItriangle = new Symbol();
|
---|
259 | static {
|
---|
260 | TopItriangle.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80)));
|
---|
261 | Symbol colours = new Symbol();
|
---|
262 | Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath();
|
---|
263 | colours.add(new Instr(Form.P1, p));
|
---|
264 | p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD);
|
---|
265 | p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath();
|
---|
266 | p.moveTo(-10.0,-24.0); p.lineTo(0.0,-6.0); p.lineTo(10.0,-24.0); p.closePath();
|
---|
267 | colours.add(new Instr(Form.B1, p));
|
---|
268 | TopItriangle.add(new Instr(Form.COLR, colours));
|
---|
269 | TopItriangle.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
270 | TopItriangle.add(new Instr(Form.FILL, Color.black));
|
---|
271 | p = new Path2D.Double(); p.moveTo(-15.0,-29.0); p.lineTo(0.0,-1.0); p.lineTo(15.0,-29.0); p.closePath();
|
---|
272 | TopItriangle.add(new Instr(Form.PLIN, p));
|
---|
273 | }
|
---|
274 | public static final Symbol TopWest = new Symbol();
|
---|
275 | static {
|
---|
276 | TopWest.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
277 | Symbol colours = new Symbol();
|
---|
278 | 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();
|
---|
279 | colours.add(new Instr(Form.P1, p));
|
---|
280 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
281 | colours.add(new Instr(Form.P2, p));
|
---|
282 | TopWest.add(new Instr(Form.COLR, colours));
|
---|
283 | TopWest.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
284 | TopWest.add(new Instr(Form.FILL, Color.black));
|
---|
285 | TopWest.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-10)));
|
---|
286 | TopWest.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
287 | p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath();
|
---|
288 | p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath();
|
---|
289 | TopWest.add(new Instr(Form.PLIN, p));
|
---|
290 | }
|
---|
291 | public static final Symbol TopX = new Symbol();
|
---|
292 | static {
|
---|
293 | TopX.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-80,60,80)));
|
---|
294 | Symbol colours = new Symbol();
|
---|
295 | 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);
|
---|
296 | 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();
|
---|
297 | colours.add(new Instr(Form.P1, p));
|
---|
298 | TopX.add(new Instr(Form.COLR, colours));
|
---|
299 | TopX.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
300 | TopX.add(new Instr(Form.FILL, Color.black));
|
---|
301 | TopX.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-27)));
|
---|
302 | TopX.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
303 | 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);
|
---|
304 | 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();
|
---|
305 | TopX.add(new Instr(Form.PLIN, p));
|
---|
306 | }
|
---|
307 |
|
---|
308 | public static final EnumMap<TopSHP, Symbol> Shapes = new EnumMap<TopSHP, Symbol>(TopSHP.class);
|
---|
309 | static {
|
---|
310 | Shapes.put(TopSHP.TOP_BESM, TopBesom); Shapes.put(TopSHP.TOP_IBESM, TopIBesom); Shapes.put(TopSHP.TOP_BORD, TopBoard); Shapes.put(TopSHP.TOP_CAN, TopCan);
|
---|
311 | Shapes.put(TopSHP.TOP_CONE, TopCone); Shapes.put(TopSHP.TOP_CROS, TopCross); Shapes.put(TopSHP.TOP_EAST, TopEast); Shapes.put(TopSHP.TOP_ICONE, TopIcone);
|
---|
312 | Shapes.put(TopSHP.TOP_ISD, TopIsol); Shapes.put(TopSHP.TOP_NORTH, TopNorth); Shapes.put(TopSHP.TOP_SOUTH, TopSouth); Shapes.put(TopSHP.TOP_SPHR, TopSphere);
|
---|
313 | Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle); Shapes.put(TopSHP.TOP_ITRI, TopItriangle); Shapes.put(TopSHP.TOP_WEST, TopWest);
|
---|
314 | Shapes.put(TopSHP.TOP_SALT, TopX); Shapes.put(TopSHP.TOP_RHOM, TopRhombus);
|
---|
315 | }
|
---|
316 | public static final EnumMap<BoySHP, Delta> BuoyDeltas = new EnumMap<BoySHP, Delta>(BoySHP.class);
|
---|
317 | static {
|
---|
318 | BuoyDeltas.put(BoySHP.BOY_PILR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 31.5, -95.0)));
|
---|
319 | BuoyDeltas.put(BoySHP.BOY_SPAR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 31.5, -95.0)));
|
---|
320 | BuoyDeltas.put(BoySHP.BOY_CAN, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9)));
|
---|
321 | BuoyDeltas.put(BoySHP.BOY_CONE, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9)));
|
---|
322 | BuoyDeltas.put(BoySHP.BOY_SPHR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9)));
|
---|
323 | BuoyDeltas.put(BoySHP.BOY_BARL, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 12.7, -37.9)));
|
---|
324 | BuoyDeltas.put(BoySHP.BOY_SUPR, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -42.0)));
|
---|
325 | BuoyDeltas.put(BoySHP.BOY_ICE, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -25.0)));
|
---|
326 | }
|
---|
327 | public static final Delta FloatDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -42.0));
|
---|
328 | public static final Delta BeaconDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -70.0));
|
---|
329 | public static final Delta LightDelta = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -20.0));
|
---|
330 |
|
---|
331 | }
|
---|