source: osm/applications/editors/josm/plugins/seachart/src/symbols/Buoys.java@ 35483

Last change on this file since 35483 was 32907, checked in by donvip, 8 years ago

checkstyle

File size: 18.7 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package symbols;
3
4import java.awt.BasicStroke;
5import java.awt.Color;
6import java.awt.geom.Arc2D;
7import java.awt.geom.Ellipse2D;
8import java.awt.geom.Line2D;
9import java.awt.geom.Path2D;
10import java.util.EnumMap;
11
12import s57.S57val.BoySHP;
13import symbols.Symbols.Form;
14import symbols.Symbols.Instr;
15import symbols.Symbols.Symbol;
16
17/**
18 * @author Malcolm Herring
19 */
20public final class Buoys {
21 private Buoys() {
22 // Hide default constructor for utilities classes
23 }
24
25 // CHECKSTYLE.OFF: LineLength
26 public static final Symbol Barrel = new Symbol();
27 static {
28 Symbol colours = new Symbol();
29 Path2D.Double p = new Path2D.Double(); p.moveTo(-50.0, 0); p.curveTo(-50.0, -11.0, -45.0, -32.0, -32.0, -36.0);
30 p.curveTo(-18.0, -40.0, 12.0, -40.0, 25.0, -36.0); p.curveTo(38.0, -32.0, 43.0, -11.0, 43.0, 0);
31 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
32 colours.add(new Instr(Form.P1, p));
33 Barrel.add(new Instr(Form.COLR, colours));
34 Barrel.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
35 Barrel.add(new Instr(Form.FILL, Color.black));
36 Barrel.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
37 Barrel.add(new Instr(Form.LINE, new Line2D.Double(-57, 0, -10, 0)));
38 Barrel.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 50, 0)));
39 p = new Path2D.Double(); p.moveTo(-50.0, 0); p.curveTo(-50.0, -11.0, -45.0, -32.0, -32.0, -36.0); p.curveTo(-18.0, -40.0, 12.0, -40.0, 25.0, -36.0);
40 p.curveTo(38.0, -32.0, 43.0, -11.0, 43.0, 0); p.moveTo(-32.0, -36.0); p.curveTo(-23.0, -25.0, -21.0, -12.0, -21.0, 0.0);
41 Barrel.add(new Instr(Form.PLIN, p));
42 }
43
44 public static final Symbol Can = new Symbol();
45 static {
46 Symbol colours = new Symbol();
47 Path2D.Double p = new Path2D.Double(); p.moveTo(-31.6, 0); p.lineTo(-15.7, -47.4); p.lineTo(41.1, -28.4); p.lineTo(31.6, 0);
48 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
49 colours.add(new Instr(Form.P1, p));
50 p = new Path2D.Double(); p.moveTo(-31.6, 0); p.lineTo(-22.0, -28.4); p.lineTo(34.8, -9.4); p.lineTo(31.6, 0);
51 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
52 colours.add(new Instr(Form.H2, p));
53 p = new Path2D.Double(); p.moveTo(-24.2, -22.1); p.lineTo(-19.9, -34.8); p.lineTo(36.9, -15.8); p.lineTo(32.6, -3.1); p.closePath();
54 colours.add(new Instr(Form.H3, p));
55 p = new Path2D.Double(); p.moveTo(-22.0, -28.4); p.lineTo(-18.9, -37.9); p.lineTo(37.9, -18.9); p.lineTo(34.8, -9.4); p.closePath();
56 colours.add(new Instr(Form.H4, p));
57 p = new Path2D.Double(); p.moveTo(-25.2, -19.0); p.lineTo(-22.0, -28.4); p.lineTo(34.8, -9.4); p.lineTo(31.6, 0.0); p.closePath();
58 colours.add(new Instr(Form.H5, p));
59 p = new Path2D.Double(); p.moveTo(12.7, -37.9); p.lineTo(41.1, -28.4); p.lineTo(31.6, 0); p.lineTo(8.0, 0.0); p.quadTo(8.0, -6.0, 2.5, -7.6); p.closePath();
60 colours.add(new Instr(Form.V2, p));
61 Can.add(new Instr(Form.COLR, colours));
62 Can.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
63 Can.add(new Instr(Form.FILL, Color.black));
64 Can.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
65 Can.add(new Instr(Form.LINE, new Line2D.Double(-40, 0, -10, 0)));
66 Can.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 40, 0)));
67 p = new Path2D.Double(); p.moveTo(-31.6, 0); p.lineTo(-15.7, -47.4); p.lineTo(41.1, -28.4); p.lineTo(31.6, 0);
68 Can.add(new Instr(Form.PLIN, p));
69 }
70
71 public static final Symbol Cone = new Symbol();
72 static {
73 Symbol colours = new Symbol();
74 Path2D.Double p = new Path2D.Double(); p.moveTo(-31.6, 0); p.curveTo(-24.9, -32.2, 1.4, -38.7, 12.7, -37.9); p.curveTo(21.9, -30.5, 32.8, -18.4, 32.1, 0.0);
75 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
76 colours.add(new Instr(Form.P1, p));
77 p = new Path2D.Double(); p.moveTo(-31.6, 0); p.quadTo(-29.0, -15.5, -17.3, -26.9); p.lineTo(31.5, -10.5); p.quadTo(33.0, -5.0, 32.1, 0.0);
78 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
79 colours.add(new Instr(Form.H2, p));
80 p = new Path2D.Double(); p.moveTo(-22.3, -21.4); p.quadTo(-15.2, -29.8, -10.8, -31.8); p.lineTo(28.8, -18.5); p.quadTo(31.8, -12.5, 32.6, -3.1); p.closePath();
81 colours.add(new Instr(Form.H3, p));
82 p = new Path2D.Double(); p.moveTo(-17.3, -27.0); p.quadTo(-13.0, -31.4, -6.9, -33.8); p.lineTo(26.4, -22.7); p.quadTo(30.0, -17.0, 31.7, -10.3); p.closePath();
83 colours.add(new Instr(Form.H4, p));
84 p = new Path2D.Double(); p.moveTo(-24.4, -18.7); p.quadTo(-20.3, -25.0, -17.3, -27.0); p.lineTo(31.7, -10.3); p.quadTo(32.7, -4.5, 32.1, 0.0); p.closePath();
85 colours.add(new Instr(Form.H5, p));
86 p = new Path2D.Double(); p.moveTo(12.7, -37.9); p.curveTo(21.9, -30.5, 32.8, -18.4, 32.1, 0.0); p.lineTo(8.0, 0.0); p.quadTo(8.0, -6.0, 2.5, -7.6); p.closePath();
87 colours.add(new Instr(Form.V2, p));
88 Cone.add(new Instr(Form.COLR, colours));
89 Cone.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
90 Cone.add(new Instr(Form.FILL, Color.black));
91 Cone.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
92 Cone.add(new Instr(Form.LINE, new Line2D.Double(-40, 0, -10, 0)));
93 Cone.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 40, 0)));
94 p = new Path2D.Double(); p.moveTo(-31.6, 0); p.curveTo(-24.9, -32.2, 1.4, -38.7, 12.7, -37.9); p.curveTo(21.9, -30.5, 32.8, -18.4, 32.1, 0.0);
95 Cone.add(new Instr(Form.PLIN, p));
96 }
97
98 public static final Symbol Float = new Symbol();
99 static {
100 Symbol colours = new Symbol();
101 Path2D.Double p = new Path2D.Double(); p.moveTo(-36.0, 0); p.lineTo(-47.0, -33.0); p.quadTo(-30.0, -25.0, -19.0, -23.0);
102 p.lineTo(-12.0, -42.0); p.lineTo(12.0, -42.0); p.lineTo(19.0, -23.0); p.quadTo(30.0, -25.0, 47.0, -33.0); p.lineTo(36.0, 0);
103 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
104 colours.add(new Instr(Form.P1, p));
105 p = new Path2D.Double(); p.moveTo(-36.0, 0); p.lineTo(-43.0, -21.0); p.lineTo(43.0, -21.0); p.lineTo(36.0, 0);
106 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
107 colours.add(new Instr(Form.H2, p));
108 p = new Path2D.Double(); p.moveTo(-40.8, -14.0); p.lineTo(-45.4, -28.0); p.lineTo(-35.5, -28.0); p.quadTo(-28.0, -25.0, -19.0, -23.0); p.lineTo(-17.2, -28.0);
109 p.lineTo(17.2, -28.0); p.lineTo(19.0, -23.0); p.quadTo(28.0, -25.0, 35.5, -28.0); p.lineTo(45.4, -28.0); p.lineTo(40.8, -14.0); p.closePath();
110 colours.add(new Instr(Form.H3, p));
111 p = new Path2D.Double(); p.moveTo(-43.0, -21.0); p.lineTo(-47.0, -33.0); p.quadTo(-29.7, -24.8, -19.0, -23.0); p.lineTo(-15.8, -31.5); p.lineTo(15.8, -31.5);
112 p.lineTo(19.0, -23.0); p.quadTo(28.4, -24.3, 47.0, -33.0); p.lineTo(43.0, -21.0); p.closePath();
113 colours.add(new Instr(Form.H4, p));
114 p = new Path2D.Double(); p.moveTo(-39.8, -11.5); p.lineTo(-43.0, -21.0); p.lineTo(43.0, -21.0); p.lineTo(39.8, -11.5); p.closePath();
115 colours.add(new Instr(Form.H5, p));
116 p = new Path2D.Double(); p.moveTo(0.0, -42.0); p.lineTo(12.0, -42.0); p.lineTo(19.0, -23.0); p.quadTo(28.4, -24.3, 47.0, -33.0); p.lineTo(36.0, 0.0);
117 p.lineTo(8.0, 0.0); p.quadTo(7.7, -7.7, 0.0, -8.0); p.closePath();
118 colours.add(new Instr(Form.V2, p));
119 Float.add(new Instr(Form.COLR, colours));
120 Float.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
121 Float.add(new Instr(Form.FILL, Color.black));
122 Float.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
123 Float.add(new Instr(Form.LINE, new Line2D.Double(-54, 0, -10, 0)));
124 Float.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 54, 0)));
125 p = new Path2D.Double(); p.moveTo(-36.0, 0); p.lineTo(-47.0, -33.0); p.curveTo(-15.0, -17.0, 15.0, -17.0, 47.0, -33.0); p.lineTo(36.0, 0);
126 p.moveTo(-19.0, -23.0); p.lineTo(-12.0, -42.0); p.lineTo(12.0, -42.0); p.lineTo(19.0, -23.0);
127 Float.add(new Instr(Form.PLIN, p));
128 }
129
130 public static final Symbol Ice = new Symbol();
131 static {
132 Symbol colours = new Symbol();
133 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0, 0); p.quadTo(-30.0, 0.0, -30.0, -15.0); p.lineTo(-30.0, -25.0); p.lineTo(30.0, -25.0); p.lineTo(30.0, -15); p.quadTo(30.0, 0.0, 15.0, 0.0);
134 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
135 colours.add(new Instr(Form.P1, p));
136 Ice.add(new Instr(Form.COLR, colours));
137 Ice.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
138 Ice.add(new Instr(Form.FILL, Color.black));
139 Ice.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
140 Ice.add(new Instr(Form.LINE, new Line2D.Double(-35, 0, -10, 0)));
141 Ice.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 35, 0)));
142 p = new Path2D.Double(); p.moveTo(-15.0, 0); p.quadTo(-30.0, 0.0, -30.0, -15.0); p.lineTo(-30.0, -25.0); p.lineTo(30.0, -25.0); p.lineTo(30.0, -15); p.quadTo(30.0, 0.0, 15.0, 0.0);
143 Ice.add(new Instr(Form.PLIN, p));
144 p = new Path2D.Double(); p.moveTo(-6.0, 8.0); p.lineTo(-6.0, 40.0); p.lineTo(6.0, 40.0); p.lineTo(6.0, 8.0);
145 Ice.add(new Instr(Form.PLIN, p));
146 }
147
148 public static final Symbol Pillar = new Symbol();
149 static {
150 Symbol colours = new Symbol();
151 Path2D.Double p = new Path2D.Double(); p.moveTo(-32.0, 0.0); p.lineTo(-2.8, -32.5); p.lineTo(25.6, -96.7); p.lineTo(37.0, -92.9); p.lineTo(21.8, -24.3);
152 p.lineTo(25.0, 0.0); p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
153 colours.add(new Instr(Form.P1, p));
154 p = new Path2D.Double(); p.moveTo(-32.0, 0); p.lineTo(-2.8, -32.5); p.lineTo(5.3, -51.0); p.lineTo(26.3, -43.9); p.lineTo(21.8, -24.3); p.lineTo(25.0, 0.0);
155 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
156 colours.add(new Instr(Form.H2, p));
157 p = new Path2D.Double(); p.moveTo(-0.9, -37.1); p.lineTo(11.3, -64.6); p.lineTo(29.6, -58.7); p.lineTo(23.1, -29.3); p.closePath();
158 colours.add(new Instr(Form.H3, p));
159 p = new Path2D.Double(); p.moveTo(5.3, -51.0); p.lineTo(14.5, -71.5); p.lineTo(31.2, -65.9); p.lineTo(26.3, -43.9); p.closePath();
160 colours.add(new Instr(Form.H4, p));
161 p = new Path2D.Double(); p.moveTo(-5.2, -29.7); p.lineTo(-2.8, -32.5); p.lineTo(5.3, -51.0); p.lineTo(26.3, -43.9); p.lineTo(21.8, -24.3); p.lineTo(22.2, -21.5); p.closePath();
162 colours.add(new Instr(Form.H5, p));
163 p = new Path2D.Double(); p.moveTo(12.7, -37.9); p.lineTo(31.3, -94.8); p.lineTo(37.0, -92.9); p.lineTo(21.8, -24.3);
164 p.lineTo(25.0, 0.0); p.lineTo(8.0, 0.0); p.quadTo(8.0, -6.0, 2.5, -7.6); p.closePath();
165 colours.add(new Instr(Form.V2, p));
166 Pillar.add(new Instr(Form.COLR, colours));
167 Pillar.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
168 Pillar.add(new Instr(Form.FILL, Color.black));
169 Pillar.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
170 Pillar.add(new Instr(Form.LINE, new Line2D.Double(-42, 0, -10, 0)));
171 Pillar.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 36, 0)));
172 p = new Path2D.Double(); p.moveTo(-32.0, 0.0); p.lineTo(-2.8, -32.5); p.lineTo(25.6, -96.7); p.lineTo(37.0, -92.9); p.lineTo(21.8, -24.3); p.lineTo(25.0, 0.0);
173 Pillar.add(new Instr(Form.PLIN, p));
174 }
175
176 public static final Symbol Spar = new Symbol();
177 static {
178 Symbol colours = new Symbol();
179 Path2D.Double p = new Path2D.Double(); p.moveTo(-3.2, -9.5); p.lineTo(25.6, -96.7); p.lineTo(37.0, -92.9); p.lineTo(8.2, -5.7); p.closePath();
180 colours.add(new Instr(Form.P1, p));
181 p = new Path2D.Double(); p.moveTo(-3.2, -9.5); p.lineTo(11.2, -53.1); p.lineTo(22.6, -49.3); p.lineTo(8.2, -5.7); p.closePath();
182 colours.add(new Instr(Form.H2, p));
183 p = new Path2D.Double(); p.moveTo(6.4, -38.6); p.lineTo(16.0, -67.6); p.lineTo(27.4, -63.8); p.lineTo(17.8, -34.8); p.closePath();
184 colours.add(new Instr(Form.H3, p));
185 p = new Path2D.Double(); p.moveTo(11.2, -53.1); p.lineTo(18.4, -74.9); p.lineTo(29.8, -71.1); p.lineTo(22.6, -49.3); p.closePath();
186 colours.add(new Instr(Form.H4, p));
187 p = new Path2D.Double(); p.moveTo(4.0, -31.3); p.lineTo(11.2, -53.1); p.lineTo(22.6, -49.3); p.lineTo(15.4, -27.5); p.closePath();
188 colours.add(new Instr(Form.H5, p));
189 p = new Path2D.Double(); p.moveTo(2.5, -7.6); p.lineTo(31.3, -94.8); p.lineTo(37.0, -92.9); p.lineTo(8.2, -5.7); p.closePath();
190 colours.add(new Instr(Form.V2, p));
191 Spar.add(new Instr(Form.COLR, colours));
192 Spar.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
193 Spar.add(new Instr(Form.FILL, Color.black));
194 Spar.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
195 Spar.add(new Instr(Form.LINE, new Line2D.Double(-20, 0, -10, 0)));
196 Spar.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 20, 0)));
197 p = new Path2D.Double(); p.moveTo(-3.2, -9.5); p.lineTo(25.6, -96.7); p.lineTo(37.0, -92.9); p.lineTo(8.2, -5.7);
198 Spar.add(new Instr(Form.PLIN, p));
199 }
200
201 public static final Symbol Sphere = new Symbol();
202 static {
203 Symbol colours = new Symbol();
204 Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0, 0); p.curveTo(-32.0, -21.0, -14.0, -45.5, 12.7, -37.9); p.curveTo(27.5, -33.8, 37.8, -15.5, 32.0, 0.0);
205 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
206 colours.add(new Instr(Form.P1, p));
207 p = new Path2D.Double(); p.moveTo(-25.0, 0); p.quadTo(-30.0, -15.0, -20.5, -28.0); p.lineTo(33.8, -10.0); p.quadTo(33.7, -4.0, 32.0, 0.0);
208 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
209 colours.add(new Instr(Form.H2, p));
210 p = new Path2D.Double(); p.moveTo(-24.2, -22.1); p.quadTo(-21.0, -28.5, -15.2, -33.3); p.lineTo(32.8, -17.2); p.quadTo(34.6, -10.0, 33.0, -2.9); p.closePath();
211 colours.add(new Instr(Form.H3, p));
212 p = new Path2D.Double(); p.moveTo(-20.5, -28.0); p.quadTo(-16.5, -33.0, -12.0, -35.5); p.lineTo(31.5, -21.0); p.quadTo(33.5, -17.0, 34.0, -9.5); p.closePath();
213 colours.add(new Instr(Form.H4, p));
214 p = new Path2D.Double(); p.moveTo(-25.2, -19.0); p.quadTo(-23.5, -24.0, -20.5, -28.0); p.lineTo(34.0, -9.5); p.quadTo(34.0, -3.0, 32.0, 0.0); p.closePath();
215 colours.add(new Instr(Form.H5, p));
216 p = new Path2D.Double(); p.moveTo(12.7, -37.9); p.curveTo(27.5, -33.8, 37.8, -15.5, 32.0, 0.0); p.lineTo(8.0, 0.0); p.quadTo(8.0, -6.0, 2.5, -7.6); p.closePath();
217 colours.add(new Instr(Form.V2, p));
218 Sphere.add(new Instr(Form.COLR, colours));
219 Sphere.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
220 Sphere.add(new Instr(Form.FILL, Color.black));
221 Sphere.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
222 Sphere.add(new Instr(Form.LINE, new Line2D.Double(-33, 0, -10, 0)));
223 Sphere.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 40, 0)));
224 Sphere.add(new Instr(Form.EARC, new Arc2D.Double(-26.5, -39.4, 60.0, 60.0, -18.0, 216.0, Arc2D.OPEN)));
225 }
226
227 public static final Symbol Storage = new Symbol();
228 static {
229 Storage.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
230 Storage.add(new Instr(Form.FILL, Color.black));
231 Storage.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
232 Path2D.Double p = new Path2D.Double(); p.moveTo(-50.0, 0.0); p.lineTo(-40.0, -20.0); p.lineTo(40.0, -20.0); p.lineTo(40.0, -20.0);
233 p.lineTo(50.0, 0.0); p.lineTo(40.0, 20.0); p.lineTo(-40.0, 20.0); p.closePath();
234 Storage.add(new Instr(Form.PLIN, p));
235 }
236
237 public static final Symbol Super = new Symbol();
238 static {
239 Symbol colours = new Symbol();
240 Path2D.Double p = new Path2D.Double(); p.moveTo(-48.0, 0); p.lineTo(-28.0, -42.0); p.lineTo(28.0, -42.0); p.lineTo(48.0, 0);
241 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
242 colours.add(new Instr(Form.P1, p));
243 p = new Path2D.Double(); p.moveTo(-48.0, 0); p.lineTo(-38.0, -21.0); p.lineTo(38.0, -21.0); p.lineTo(48.0, 0);
244 p.lineTo(8.0, 0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
245 colours.add(new Instr(Form.H2, p));
246 p = new Path2D.Double(); p.moveTo(-41.3, -14.0); p.lineTo(-34.7, -28.0); p.lineTo(34.7, -28.0); p.lineTo(41.3, -14.0); p.closePath();
247 colours.add(new Instr(Form.H3, p));
248 p = new Path2D.Double(); p.moveTo(-38.0, -21.0); p.lineTo(-33.0, -31.5); p.lineTo(33.0, -31.5); p.lineTo(38.0, -21.0); p.closePath();
249 colours.add(new Instr(Form.H4, p));
250 p = new Path2D.Double(); p.moveTo(-43.0, -11.5); p.lineTo(-38.0, -21.0); p.lineTo(38.0, -21.0); p.lineTo(43.0, -11.5); p.closePath();
251 colours.add(new Instr(Form.H5, p));
252 p = new Path2D.Double(); p.moveTo(0.0, -42.0); p.lineTo(28.0, -42.0); p.lineTo(48.0, 0.0); p.lineTo(8.0, 0.0); p.quadTo(7.7, -7.7, 0.0, -8.0); p.closePath();
253 colours.add(new Instr(Form.V2, p));
254 Super.add(new Instr(Form.COLR, colours));
255 Super.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
256 Super.add(new Instr(Form.FILL, Color.black));
257 Super.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10, -10, 20, 20)));
258 Super.add(new Instr(Form.LINE, new Line2D.Double(-54, 0, -10, 0)));
259 Super.add(new Instr(Form.LINE, new Line2D.Double(10, 0, 54, 0)));
260 p = new Path2D.Double(); p.moveTo(-48.0, 0); p.lineTo(-28.0, -42.0); p.lineTo(28.0, -42.0); p.lineTo(48.0, 0);
261 Super.add(new Instr(Form.PLIN, p));
262 }
263
264 public static final EnumMap<BoySHP, Symbol> Shapes = new EnumMap<>(BoySHP.class);
265 static {
266 Shapes.put(BoySHP.BOY_UNKN, Buoys.Pillar); Shapes.put(BoySHP.BOY_CONE, Buoys.Cone); Shapes.put(BoySHP.BOY_CAN, Buoys.Can);
267 Shapes.put(BoySHP.BOY_SPHR, Buoys.Sphere); Shapes.put(BoySHP.BOY_PILR, Buoys.Pillar); Shapes.put(BoySHP.BOY_SPAR, Buoys.Spar);
268 Shapes.put(BoySHP.BOY_BARL, Buoys.Barrel); Shapes.put(BoySHP.BOY_SUPR, Buoys.Super); Shapes.put(BoySHP.BOY_ICE, Buoys.Ice);
269 }
270}
Note: See TracBrowser for help on using the repository browser.