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

Last change on this file since 32090 was 30894, checked in by malcolmh, 10 years ago

Add SeaChart plugin

File size: 17.0 KB
Line 
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
10package symbols;
11
12import java.awt.BasicStroke;
13import java.awt.Color;
14import java.awt.geom.*;
15import java.util.EnumMap;
16
17import s57.S57val.BoySHP;
18import symbols.Symbols.*;
19
20public class Buoys {
21
22 public static final Symbol Barrel = new Symbol();
23 static {
24 Symbol colours = new Symbol();
25 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);
26 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);
27 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
28 colours.add(new Instr(Form.P1, p));
29 Barrel.add(new Instr(Form.COLR, colours));
30 Barrel.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
31 Barrel.add(new Instr(Form.FILL, Color.black));
32 Barrel.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
33 Barrel.add(new Instr(Form.LINE, new Line2D.Double(-57,0,-10,0)));
34 Barrel.add(new Instr(Form.LINE, new Line2D.Double(10,0,50,0)));
35 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);
36 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);
37 Barrel.add(new Instr(Form.PLIN, p));
38 }
39 public static final Symbol Can = new Symbol();
40 static {
41 Symbol colours = new Symbol();
42 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);
43 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
44 colours.add(new Instr(Form.P1, p));
45 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);
46 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
47 colours.add(new Instr(Form.H2, p));
48 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();
49 colours.add(new Instr(Form.H3, p));
50 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();
51 colours.add(new Instr(Form.H4, p));
52 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();
53 colours.add(new Instr(Form.H5, p));
54 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();
55 colours.add(new Instr(Form.V2, p));
56 Can.add(new Instr(Form.COLR, colours));
57 Can.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
58 Can.add(new Instr(Form.FILL, Color.black));
59 Can.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
60 Can.add(new Instr(Form.LINE, new Line2D.Double(-40,0,-10,0)));
61 Can.add(new Instr(Form.LINE, new Line2D.Double(10,0,40,0)));
62 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);
63 Can.add(new Instr(Form.PLIN, p));
64 }
65 public static final Symbol Cone = new Symbol();
66 static {
67 Symbol colours = new Symbol();
68 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);
69 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
70 colours.add(new Instr(Form.P1, p));
71 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);
72 p.lineTo(8.0,0.0); p.curveTo(8.0, -11.0, -8.0, -11.0, -8.0, 0.0); p.closePath();
73 colours.add(new Instr(Form.H2, p));
74 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();
75 colours.add(new Instr(Form.H3, p));
76 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();
77 colours.add(new Instr(Form.H4, p));
78 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();
79 colours.add(new Instr(Form.H5, p));
80 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();
81 colours.add(new Instr(Form.V2, p));
82 Cone.add(new Instr(Form.COLR, colours));
83 Cone.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
84 Cone.add(new Instr(Form.FILL, Color.black));
85 Cone.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
86 Cone.add(new Instr(Form.LINE, new Line2D.Double(-40,0,-10,0)));
87 Cone.add(new Instr(Form.LINE, new Line2D.Double(10,0,40,0)));
88 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);
89 Cone.add(new Instr(Form.PLIN, p));
90 }
91 public static final Symbol Float = new Symbol();
92 static {
93 Symbol colours = new Symbol();
94 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);
95 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);
96 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
97 colours.add(new Instr(Form.P1, p));
98 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);
99 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
100 colours.add(new Instr(Form.H2, p));
101 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);
102 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();
103 colours.add(new Instr(Form.H3, p));
104 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);
105 p.lineTo(19.0,-23.0); p.quadTo(28.4,-24.3,47.0,-33.0); p.lineTo(43.0,-21.0); p.closePath();
106 colours.add(new Instr(Form.H4, p));
107 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();
108 colours.add(new Instr(Form.H5, p));
109 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);
110 p.lineTo(8.0,0.0); p.quadTo(7.7,-7.7,0.0,-8.0); p.closePath();
111 colours.add(new Instr(Form.V2, p));
112 Float.add(new Instr(Form.COLR, colours));
113 Float.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
114 Float.add(new Instr(Form.FILL, Color.black));
115 Float.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
116 Float.add(new Instr(Form.LINE, new Line2D.Double(-54,0,-10,0)));
117 Float.add(new Instr(Form.LINE, new Line2D.Double(10,0,54,0)));
118 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);
119 p.moveTo(-19.0, -23.0); p.lineTo(-12.0,-42.0); p.lineTo(12.0,-42.0); p.lineTo(19.0,-23.0);
120 Float.add(new Instr(Form.PLIN, p));
121 }
122 public static final Symbol Ice = new Symbol();
123 static {
124 Symbol colours = new Symbol();
125 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);
126 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
127 colours.add(new Instr(Form.P1, p));
128 Ice.add(new Instr(Form.COLR, colours));
129 Ice.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
130 Ice.add(new Instr(Form.FILL, Color.black));
131 Ice.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
132 Ice.add(new Instr(Form.LINE, new Line2D.Double(-35,0,-10,0)));
133 Ice.add(new Instr(Form.LINE, new Line2D.Double(10,0,35,0)));
134 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);
135 Ice.add(new Instr(Form.PLIN, p));
136 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);
137 Ice.add(new Instr(Form.PLIN, p));
138 }
139 public static final Symbol Pillar = new Symbol();
140 static {
141 Symbol colours = new Symbol();
142 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);
143 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();
144 colours.add(new Instr(Form.P1, p));
145 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);
146 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
147 colours.add(new Instr(Form.H2, p));
148 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();
149 colours.add(new Instr(Form.H3, p));
150 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();
151 colours.add(new Instr(Form.H4, p));
152 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();
153 colours.add(new Instr(Form.H5, p));
154 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);
155 p.lineTo(25.0,0.0); p.lineTo(8.0,0.0); p.quadTo(8.0,-6.0,2.5,-7.6); p.closePath();
156 colours.add(new Instr(Form.V2, p));
157 Pillar.add(new Instr(Form.COLR, colours));
158 Pillar.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
159 Pillar.add(new Instr(Form.FILL, Color.black));
160 Pillar.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
161 Pillar.add(new Instr(Form.LINE, new Line2D.Double(-42,0,-10,0)));
162 Pillar.add(new Instr(Form.LINE, new Line2D.Double(10,0,36,0)));
163 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);
164 Pillar.add(new Instr(Form.PLIN, p));
165 }
166 public static final Symbol Spar = new Symbol();
167 static {
168 Symbol colours = new Symbol();
169 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();
170 colours.add(new Instr(Form.P1, p));
171 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();
172 colours.add(new Instr(Form.H2, p));
173 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();
174 colours.add(new Instr(Form.H3, p));
175 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();
176 colours.add(new Instr(Form.H4, p));
177 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();
178 colours.add(new Instr(Form.H5, p));
179 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();
180 colours.add(new Instr(Form.V2, p));
181 Spar.add(new Instr(Form.COLR, colours));
182 Spar.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
183 Spar.add(new Instr(Form.FILL, Color.black));
184 Spar.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
185 Spar.add(new Instr(Form.LINE, new Line2D.Double(-20,0,-10,0)));
186 Spar.add(new Instr(Form.LINE, new Line2D.Double(10,0,20,0)));
187 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);
188 Spar.add(new Instr(Form.PLIN, p));
189 }
190 public static final Symbol Sphere = new Symbol();
191 static {
192 Symbol colours = new Symbol();
193 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);
194 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
195 colours.add(new Instr(Form.P1, p));
196 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);
197 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
198 colours.add(new Instr(Form.H2, p));
199 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();
200 colours.add(new Instr(Form.H3, p));
201 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();
202 colours.add(new Instr(Form.H4, p));
203 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();
204 colours.add(new Instr(Form.H5, p));
205 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();
206 colours.add(new Instr(Form.V2, p));
207 Sphere.add(new Instr(Form.COLR, colours));
208 Sphere.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
209 Sphere.add(new Instr(Form.FILL, Color.black));
210 Sphere.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
211 Sphere.add(new Instr(Form.LINE, new Line2D.Double(-33,0,-10,0)));
212 Sphere.add(new Instr(Form.LINE, new Line2D.Double(10,0,40,0)));
213 Sphere.add(new Instr(Form.EARC, new Arc2D.Double(-26.5,-39.4,60.0,60.0,-18.0,216.0,Arc2D.OPEN)));
214 }
215 public static final Symbol Storage = new Symbol();
216 static {
217 Storage.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
218 Storage.add(new Instr(Form.FILL, Color.black));
219 Storage.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
220 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);
221 p.lineTo(50.0,0.0); p.lineTo(40.0,20.0); p.lineTo(-40.0,20.0); p.closePath();
222 Storage.add(new Instr(Form.PLIN, p));
223 }
224 public static final Symbol Super = new Symbol();
225 static {
226 Symbol colours = new Symbol();
227 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);
228 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
229 colours.add(new Instr(Form.P1, p));
230 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);
231 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath();
232 colours.add(new Instr(Form.H2, p));
233 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();
234 colours.add(new Instr(Form.H3, p));
235 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();
236 colours.add(new Instr(Form.H4, p));
237 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();
238 colours.add(new Instr(Form.H5, p));
239 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();
240 colours.add(new Instr(Form.V2, p));
241 Super.add(new Instr(Form.COLR, colours));
242 Super.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
243 Super.add(new Instr(Form.FILL, Color.black));
244 Super.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
245 Super.add(new Instr(Form.LINE, new Line2D.Double(-54,0,-10,0)));
246 Super.add(new Instr(Form.LINE, new Line2D.Double(10,0,54,0)));
247 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);
248 Super.add(new Instr(Form.PLIN, p));
249 }
250
251 public static final EnumMap<BoySHP, Symbol> Shapes = new EnumMap<BoySHP, Symbol>(BoySHP.class);
252 static {
253 Shapes.put(BoySHP.BOY_UNKN, Buoys.Pillar); Shapes.put(BoySHP.BOY_CONE, Buoys.Cone); Shapes.put(BoySHP.BOY_CAN, Buoys.Can);
254 Shapes.put(BoySHP.BOY_SPHR, Buoys.Sphere); Shapes.put(BoySHP.BOY_PILR, Buoys.Pillar); Shapes.put(BoySHP.BOY_SPAR, Buoys.Spar);
255 Shapes.put(BoySHP.BOY_BARL, Buoys.Barrel); Shapes.put(BoySHP.BOY_SUPR, Buoys.Super); Shapes.put(BoySHP.BOY_ICE, Buoys.Ice);
256 }
257}
Note: See TracBrowser for help on using the repository browser.