source: osm/applications/editors/josm/plugins/seachart/src/symbols/Areas.java

Last change on this file was 36267, checked in by malcolmh, 5 months ago

update

File size: 23.0 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package symbols;
3
4import java.awt.BasicStroke;
5import java.awt.Color;
6import java.awt.Graphics2D;
7import java.awt.geom.AffineTransform;
8import java.awt.geom.Ellipse2D;
9import java.awt.geom.Line2D;
10import java.awt.geom.Path2D;
11import java.awt.geom.Rectangle2D;
12import java.awt.image.BufferedImage;
13
14import symbols.Symbols.Delta;
15import symbols.Symbols.Form;
16import symbols.Symbols.Handle;
17import symbols.Symbols.Instr;
18import symbols.Symbols.Symbol;
19
20/**
21 * @author Malcolm Herring
22 */
23public final class Areas {
24 private Areas() {
25 // Hide default constructor for utilities classes
26 }
27
28 // CHECKSTYLE.OFF: LineLength
29 public static final Symbol Plane = new Symbol();
30 static {
31 Plane.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60, -60, 120, 120)));
32 Path2D.Double p = new Path2D.Double(); p.moveTo(40, 20); p.lineTo(50, 10); p.lineTo(27.0, 13.3); p.lineTo(23.7, 6.8); p.lineTo(40.0, 5.0); p.curveTo(55, 4, 55, -9, 40, -10);
33 p.quadTo(31, -11, 30, -15); p.lineTo(-30, 2); p.quadTo(-35, -12, -45, -15); p.quadTo(-56, -3, -50, 15); p.lineTo(18.4, 7.3); p.lineTo(21.7, 14); p.lineTo(-20, 20); p.closePath();
34 Plane.add(new Instr(Form.PGON, p));
35 }
36
37 public static final Symbol LimitDash = new Symbol();
38 static {
39 LimitDash.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -30, 60, 60)));
40 LimitDash.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
41 LimitDash.add(new Instr(Form.LINE, new Line2D.Double(0, -30, 0, 30)));
42 }
43
44 public static final Symbol LimitCC = new Symbol();
45 static {
46 LimitCC.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -240, 60, 240)));
47 LimitCC.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
48 LimitCC.add(new Instr(Form.LINE, new Line2D.Double(0, -200, 0, -160)));
49 LimitCC.add(new Instr(Form.LINE, new Line2D.Double(-20, -180, 20, -180)));
50 LimitCC.add(new Instr(Form.LINE, new Line2D.Double(0, -80, 0, -120)));
51 LimitCC.add(new Instr(Form.LINE, new Line2D.Double(-20, -100, 20, -100)));
52 }
53
54 public static final Symbol Cable = new Symbol();
55 static {
56 Cable.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 60)));
57 Cable.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
58 Cable.add(new Instr(Form.FILL, new Color(0xc480ff)));
59 Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.curveTo(-13, -13, -13, -17, 0, -30); p.curveTo(13, -43, 13, -47, 0, -60);
60 Cable.add(new Instr(Form.PLIN, p));
61 }
62
63 public static final Symbol CableDot = new Symbol();
64 static {
65 CableDot.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 60)));
66 CableDot.add(new Instr(Form.RSHP, new Ellipse2D.Double(-10, -40, 20, 20)));
67 }
68
69 public static final Symbol CableDash = new Symbol();
70 static {
71 CableDash.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 60)));
72 CableDash.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
73 CableDash.add(new Instr(Form.LINE, new Line2D.Double(0, -15, 0, -45)));
74 }
75
76 public static final Symbol CableFlash = new Symbol();
77 static {
78 CableFlash.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 60)));
79 Path2D.Double p = new Path2D.Double(); p.moveTo(-30, -25); p.lineTo(-10, -40); p.lineTo(10, -26); p.lineTo(30, -35); p.lineTo(10, -20); p.lineTo(-10, -34); p.closePath();
80 CableFlash.add(new Instr(Form.PGON, p));
81 }
82
83 public static final Symbol Dash = new Symbol();
84 static {
85 Dash.add(new Instr(Form.BBOX, new Rectangle2D.Double(-15, -30, 30, 30)));
86 Dash.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
87 Dash.add(new Instr(Form.LINE, new Line2D.Double(0, 0, 0, -30)));
88 }
89
90 public static final Symbol Foul = new Symbol();
91 static {
92 Foul.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 60)));
93 Foul.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
94 Foul.add(new Instr(Form.FILL, Color.black));
95 Path2D.Double p = new Path2D.Double();
96 p.moveTo(0, -30); p.lineTo(-20, 30);
97 p.moveTo(20, -30); p.lineTo(0, 30);
98 p.moveTo(-20, -15); p.lineTo(30, -15);
99 p.moveTo(-30, 15); p.lineTo(20, 15);
100 Foul.add(new Instr(Form.PLIN, p));
101 }
102
103 public static final Symbol LaneArrow = new Symbol();
104 static {
105 LaneArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -240, 40, 240)));
106 LaneArrow.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
107 LaneArrow.add(new Instr(Form.FILL, Symbols.Mtss));
108 Path2D.Double p = new Path2D.Double(); p.moveTo(15, 0); p.lineTo(15, -195); p.lineTo(40, -195);
109 p.lineTo(0, -240); p.lineTo(-40, -195); p.lineTo(-15, -195); p.lineTo(-15, 0); p.closePath();
110 LaneArrow.add(new Instr(Form.PLIN, p));
111 }
112
113 public static final Symbol LineAnchor = new Symbol();
114 static {
115 LineAnchor.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 90)));
116 LineAnchor.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.5, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))))));
117 }
118
119 public static final Symbol LineFoul = new Symbol();
120 static {
121 LineFoul.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 90)));
122 LineFoul.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Foul, 0.5, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))))));
123 }
124
125 public static final Symbol LinePlane = new Symbol();
126 static {
127 LinePlane.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 90)));
128 LinePlane.add(new Instr(Form.FILL, new Color(0xc480ff)));
129 LinePlane.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Areas.Plane, 0.5, 0, 0, null, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))))));
130 }
131
132 public static final Symbol MarineFarm = new Symbol();
133 static {
134 MarineFarm.add(new Instr(Form.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
135 Path2D.Double p = new Path2D.Double(); p.moveTo(-23, 12); p.lineTo(-23, 23); p.lineTo(23, 23); p.lineTo(23, 12); p.moveTo(-8, 15); p.lineTo(-8, 23); p.moveTo(8, 15); p.lineTo(8, 23);
136 p.moveTo(-23, -12); p.lineTo(-23, -23); p.lineTo(23, -23); p.lineTo(23, -12); p.moveTo(-8, -15); p.lineTo(-8, -23); p.moveTo(8, -15); p.lineTo(8, -23);
137 p.moveTo(-21, 8); p.quadTo(-1, -14, 21, 0); p.quadTo(-1, 14, -21, -8); p.moveTo(7, 6); p.quadTo(2, 0, 7, -6);
138 MarineFarm.add(new Instr(Form.PLIN, p));
139 MarineFarm.add(new Instr(Form.RSHP, new Ellipse2D.Double(9, -2, 4, 4)));
140 }
141
142 public static final Symbol NoWake = new Symbol();
143 static {
144 NoWake.add(new Instr(Form.STRK, new BasicStroke(12, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
145 NoWake.add(new Instr(Form.FILL, new Color(0xa30075)));
146 Path2D.Double p = new Path2D.Double(); p.moveTo(-60, 20); p.curveTo(-28, 20, -32, 0, 0, 0); p.curveTo(32, 0, 28, 20, 60, 20); p.moveTo(-60, 0); p.curveTo(-28, 0, -32, -20, 0, -20); p.curveTo(32, -20, 28, 0, 60, 0);
147 NoWake.add(new Instr(Form.PLIN, p));
148 NoWake.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
149 NoWake.add(new Instr(Form.LINE, new Line2D.Double(-60, 60, 60, -60)));
150 NoWake.add(new Instr(Form.LINE, new Line2D.Double(-60, -60, 60, 60)));
151 }
152
153 public static final Symbol Pipeline = new Symbol();
154 static {
155 Pipeline.add(new Instr(Form.BBOX, new Rectangle2D.Double(-15, -60, 30, 60)));
156 Pipeline.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
157 Pipeline.add(new Instr(Form.LINE, new Line2D.Double(0, 0, 0, -50)));
158 Pipeline.add(new Instr(Form.RSHP, new Ellipse2D.Double(-10, -60, 20, 20)));
159 }
160
161 public static final Symbol Restricted = new Symbol();
162 static {
163 Restricted.add(new Instr(Form.BBOX, new Rectangle2D.Double(-15, -30, 30, 30)));
164 Restricted.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
165 Restricted.add(new Instr(Form.LINE, new Line2D.Double(0, 0, 0, -30)));
166 Restricted.add(new Instr(Form.LINE, new Line2D.Double(0, -15, 17, -15)));
167 }
168
169 public static final Symbol Rock = new Symbol();
170 static {
171 Rock.add(new Instr(Form.FILL, new Color(0x80c0ff)));
172 Rock.add(new Instr(Form.RSHP, new Ellipse2D.Double(-30, -30, 60, 60)));
173 Rock.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5, 5}, 0)));
174 Rock.add(new Instr(Form.FILL, Color.black));
175 Rock.add(new Instr(Form.ELPS, new Ellipse2D.Double(-30, -30, 60, 60)));
176 Rock.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
177 Rock.add(new Instr(Form.LINE, new Line2D.Double(-20, 0, 20, 0)));
178 Rock.add(new Instr(Form.LINE, new Line2D.Double(0, -20, 0, 20)));
179 }
180
181 public static final Symbol RockA = new Symbol();
182 static {
183 RockA.add(new Instr(Form.FILL, new Color(0x80c0ff)));
184 RockA.add(new Instr(Form.RSHP, new Ellipse2D.Double(-30, -30, 60, 60)));
185 RockA.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5, 5}, 0)));
186 RockA.add(new Instr(Form.FILL, Color.black));
187 RockA.add(new Instr(Form.ELPS, new Ellipse2D.Double(-30, -30, 60, 60)));
188 RockA.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
189 RockA.add(new Instr(Form.LINE, new Line2D.Double(-20, 0, 20, 0)));
190 RockA.add(new Instr(Form.LINE, new Line2D.Double(0, -20, 0, 20)));
191 RockA.add(new Instr(Form.RSHP, new Ellipse2D.Double(-17, -17, 8, 8)));
192 RockA.add(new Instr(Form.RSHP, new Ellipse2D.Double(-17, 9, 8, 8)));
193 RockA.add(new Instr(Form.RSHP, new Ellipse2D.Double(9, -17, 8, 8)));
194 RockA.add(new Instr(Form.RSHP, new Ellipse2D.Double(9, 9, 8, 8)));
195 }
196
197 public static final Symbol RockC = new Symbol();
198 static {
199 RockC.add(new Instr(Form.FILL, new Color(0x80c0ff)));
200 RockC.add(new Instr(Form.RSHP, new Ellipse2D.Double(-30, -30, 60, 60)));
201 RockC.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5, 5}, 0)));
202 RockC.add(new Instr(Form.FILL, Color.black));
203 RockC.add(new Instr(Form.ELPS, new Ellipse2D.Double(-30, -30, 60, 60)));
204 RockC.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
205 RockC.add(new Instr(Form.LINE, new Line2D.Double(-20, 0, 20, 0)));
206 RockC.add(new Instr(Form.LINE, new Line2D.Double(-10, 17.3, 10, -17.3)));
207 RockC.add(new Instr(Form.LINE, new Line2D.Double(10, 17.3, -10, -17.3)));
208 }
209
210 public static final Symbol Seaplane = new Symbol();
211 static {
212 Seaplane.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60, -60, 120, 120)));
213 Seaplane.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
214 Seaplane.add(new Instr(Form.ELPS, new Ellipse2D.Double(-58, -58, 116, 116)));
215 Seaplane.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Areas.Plane, 1.0, 0, 0, null, null)));
216 }
217
218 public static final Symbol WindFarm = new Symbol();
219 static {
220 WindFarm.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
221 WindFarm.add(new Instr(Form.ELPS, new Ellipse2D.Double(-100, -100, 200, 200)));
222 WindFarm.add(new Instr(Form.LINE, new Line2D.Double(-35, 50, 35, 50)));
223 WindFarm.add(new Instr(Form.LINE, new Line2D.Double(0, 50, 0, -27.5)));
224 WindFarm.add(new Instr(Form.LINE, new Line2D.Double(0, -27.5, 30, -27.5)));
225 WindFarm.add(new Instr(Form.LINE, new Line2D.Double(0, -27.5, -13.8, -3.8)));
226 WindFarm.add(new Instr(Form.LINE, new Line2D.Double(0, -27.5, -13.8, -53.6)));
227 }
228
229 public static final Symbol WreckD = new Symbol();
230 static {
231 WreckD.add(new Instr(Form.FILL, new Color(0x80c0ff)));
232 WreckD.add(new Instr(Form.RSHP, new Ellipse2D.Double(-50, -40, 100, 80)));
233 WreckD.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5, 5}, 0)));
234 WreckD.add(new Instr(Form.FILL, Color.black));
235 WreckD.add(new Instr(Form.ELPS, new Ellipse2D.Double(-50, -40, 100, 80)));
236 WreckD.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
237 WreckD.add(new Instr(Form.LINE, new Line2D.Double(-40, 0, 40, 0)));
238 WreckD.add(new Instr(Form.LINE, new Line2D.Double(0, -30, 0, 30)));
239 WreckD.add(new Instr(Form.LINE, new Line2D.Double(-20, -15, -20, 15)));
240 WreckD.add(new Instr(Form.LINE, new Line2D.Double(20, -15, 20, 15)));
241 }
242
243 public static final Symbol WreckND = new Symbol();
244 static {
245 WreckND.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
246 WreckND.add(new Instr(Form.LINE, new Line2D.Double(-40, 0, 40, 0)));
247 WreckND.add(new Instr(Form.LINE, new Line2D.Double(0, -30, 0, 30)));
248 WreckND.add(new Instr(Form.LINE, new Line2D.Double(-20, -15, -20, 15)));
249 WreckND.add(new Instr(Form.LINE, new Line2D.Double(20, -15, 20, 15)));
250 }
251
252 public static final Symbol WreckS = new Symbol();
253 static {
254 WreckS.add(new Instr(Form.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
255 WreckS.add(new Instr(Form.ELPS, new Ellipse2D.Double(-6, -6, 12, 12)));
256 WreckS.add(new Instr(Form.LINE, new Line2D.Double(-40, 0, -6, 0)));
257 WreckS.add(new Instr(Form.LINE, new Line2D.Double(40, 0, 6, 0)));
258 Path2D.Double p = new Path2D.Double(); p.moveTo(-30, 0); p.lineTo(-40, -25); p.lineTo(-0.3, -12.6); p.lineTo(13.7, -37.7); p.lineTo(16.3, -36.3);
259 p.lineTo(2.7, -11.6); p.lineTo(37.5, 0); p.lineTo(6, 0); p.curveTo(5.6, -8, -5.6, -8, -6, 0); p.closePath();
260 WreckS.add(new Instr(Form.PGON, p));
261 }
262
263 public static final BufferedImage Sandwaves = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
264 static {
265 Graphics2D g2 = Sandwaves.createGraphics();
266 g2.setStroke(new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
267 g2.setBackground(new Color(0, true));
268 g2.clearRect(0, 0, 100, 100);
269 g2.setPaint(Color.black);
270 Path2D.Double p = new Path2D.Double();
271 p.moveTo(0.0, 34.5); p.lineTo(03.3, 30.8); p.lineTo(09.9, 19.3); p.lineTo(13.2, 16.0); p.lineTo(16.5, 16.1); p.lineTo(18.2, 19.5);
272 p.lineTo(19.9, 25.0); p.lineTo(21.6, 30.3); p.lineTo(23.3, 33.4); p.lineTo(25.0, 33.3); p.lineTo(28.3, 30.1); p.lineTo(31.6, 25.0); p.lineTo(34.9, 20.1); p.lineTo(38.2, 17.2);
273 p.lineTo(41.5, 17.3); p.lineTo(43.2, 20.3); p.lineTo(44.9, 25); p.lineTo(46.6, 29.6); p.lineTo(48.3, 32.2); p.lineTo(50.0, 32.1);
274 p.moveTo(50.0, 84.5); p.lineTo(53.3, 80.8); p.lineTo(56.6, 75.0); p.lineTo(59.9, 69.3); p.lineTo(63.2, 66.0); p.lineTo(66.5, 66.1); p.lineTo(68.2, 69.5); p.lineTo(69.9, 75.0);
275 p.lineTo(71.6, 80.3); p.lineTo(73.3, 83.4); p.lineTo(75.0, 83.3); p.lineTo(78.3, 80.1); p.lineTo(81.6, 75.0); p.lineTo(84.9, 70.1); p.lineTo(88.2, 67.2); p.lineTo(91.5, 67.3);
276 p.lineTo(93.2, 70.3); p.lineTo(94.9, 75.0); p.lineTo(96.6, 79.6); p.lineTo(98.3, 82.2); p.lineTo(100.0, 82.1);
277 g2.draw(p);
278 }
279
280 public static final Symbol Spring = new Symbol();
281 static {
282 Spring.add(new Instr(Form.FILL, Color.black));
283 Spring.add(new Instr(Form.STRK, new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
284 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, 0, 10, 10)));
285 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-20, 0, 10, 10)));
286 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-40, 0, 10, 10)));
287 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(20, 0, 10, 10)));
288 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(40, 0, 10, 10)));
289 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -20, 10, 10)));
290 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -40, 10, 10)));
291 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -60, 10, 10)));
292 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(0, -80, 10, 10)));
293 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-15, -90, 10, 10)));
294 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(15, -90, 10, 10)));
295 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-35, -85, 10, 10)));
296 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(35, -85, 10, 10)));
297 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(-50, -70, 10, 10)));
298 Spring.add(new Instr(Form.RSHP, new Ellipse2D.Double(50, -70, 10, 10)));
299 }
300
301 public static final BufferedImage Seagrass = new BufferedImage(240, 240, BufferedImage.TYPE_INT_ARGB);
302 static {
303 Graphics2D g2 = Seagrass.createGraphics();
304 g2.setStroke(new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
305 g2.setBackground(new Color(0, true));
306 g2.clearRect(0, 0, 240, 240);
307 g2.setPaint(new Color(0x2E8E20));
308 Path2D.Double p = new Path2D.Double();
309 p.moveTo(90, 100); p.quadTo(50, 93, 29, 110);
310 p.moveTo(78, 98); p.quadTo(120, 75, 115, 50);
311 p.moveTo(45, 100); p.quadTo(65, 80, 55, 60); p.quadTo(50, 35, 60, 10);
312 p.moveTo(32, 108); p.quadTo(50, 90, 43, 70); p.quadTo(35, 40, 41, 18);
313 p.moveTo(32, 108); p.quadTo(0, 70, 16, 46);
314 p.moveTo(42, 103); p.quadTo(13, 75, 32, 31);
315 p.moveTo(23, 95); p.quadTo(35, 90, 34, 63);
316 p.moveTo(59, 99); p.quadTo(75, 75, 71, 22);
317 p.moveTo(66, 98); p.quadTo(85, 75, 82, 27);
318 p.moveTo(55, 97); p.quadTo(110, 50, 106, 30);
319 p.moveTo(90+120, 100+120); p.quadTo(50+120, 93+120, 29+120, 110+120);
320 p.moveTo(78+120, 98+120); p.quadTo(120+120, 75+120, 115+120, 50+120);
321 p.moveTo(45+120, 100+120); p.quadTo(65+120, 80+120, 55+120, 60+120); p.quadTo(50+120, 35+120, 60+120, 10+120);
322 p.moveTo(32+120, 108+120); p.quadTo(50+120, 90+120, 43+120, 70+120); p.quadTo(35+120, 40+120, 41+120, 18+120);
323 p.moveTo(32+120, 108+120); p.quadTo(0+120, 70+120, 16+120, 46+120);
324 p.moveTo(42+120, 103+120); p.quadTo(13+120, 75+120, 32+120, 31+120);
325 p.moveTo(23+120, 95+120); p.quadTo(35+120, 90+120, 34+120, 63+120);
326 p.moveTo(59+120, 99+120); p.quadTo(75+120, 75+120, 71+120, 22+120);
327 p.moveTo(66+120, 98+120); p.quadTo(85+120, 75+120, 82+120, 27+120);
328 p.moveTo(55+120, 97+120); p.quadTo(110+120, 50+120, 106+120, 30+120);
329 g2.draw(p);
330 }
331
332 public static final Symbol SeagrassP = new Symbol();
333 static {
334 SeagrassP.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60, -60, 120, 120)));
335 SeagrassP.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
336 SeagrassP.add(new Instr(Form.FILL, new Color(0x2E8E20)));
337 Path2D.Double p = new Path2D.Double();
338 p.moveTo(30, 40); p.quadTo(-10, 33, -31, 50);
339 p.moveTo(18, 38); p.quadTo(60, 15, 55, -10);
340 p.moveTo(-15, 40); p.quadTo(5, 20, -5, 0); p.quadTo(-10, -25, 0, -50);
341 p.moveTo(-28, 48); p.quadTo(-10, 30, -17, 10); p.quadTo(-25, -20, -19, -42);
342 p.moveTo(-28, 48); p.quadTo(-60, 10, -44, -14);
343 p.moveTo(-18, 43); p.quadTo(-47, 15, -28, -29);
344 p.moveTo(-37, 35); p.quadTo(-25, 30, -26, 3);
345 p.moveTo(-1, 39); p.quadTo(15, 15, 11, -38);
346 p.moveTo(6, 38); p.quadTo(25, 15, 22, -33);
347 SeagrassP.add(new Instr(Form.PLIN, p));
348 }
349
350 public static final Symbol Rocks = new Symbol();
351 static {
352 Rocks.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30, -60, 60, 120)));
353 Rocks.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
354 Path2D.Double p = new Path2D.Double();
355 p.moveTo(8, -50); p.quadTo(5, -58, 0, -60); p.quadTo(-15, -50, -8, -30); p.quadTo(-10, -20, 0, -15); p.quadTo(10, -10, 15, -25);
356 p.moveTo(0, -15); p.quadTo(-18, -6, -12, 10); p.quadTo(-9, 20, 0, 20); p.quadTo(8, 16, 12, 25);
357 p.moveTo(0, 20); p.quadTo(-15, 26, -10, 44); p.quadTo(-12, 55, 0, 60);
358 Rocks.add(new Instr(Form.PLIN, p));
359 }
360
361 public static final Symbol Coral = new Symbol();
362 static {
363 Coral.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -60, 40, 120)));
364 Coral.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
365 Path2D.Double p = new Path2D.Double(); p.moveTo(0, -60); p.lineTo(0, -50); p.moveTo(15, -48); p.lineTo(-20, -50);
366 p.lineTo(0, -30); p.lineTo(-20, -20); p.lineTo(10, 0); p.lineTo(-20, 20); p.lineTo(0, 30); p.lineTo(-20, 50);
367 p.lineTo(20, 45); p.moveTo(0, 49); p.lineTo(0, 60);
368 Coral.add(new Instr(Form.PLIN, p));
369 }
370
371 public static final BufferedImage Kelp = new BufferedImage(240, 240, BufferedImage.TYPE_INT_ARGB);
372 static {
373 Graphics2D g2 = Kelp.createGraphics();
374 g2.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
375 g2.setBackground(new Color(0, true));
376 g2.clearRect(0, 0, 240, 240);
377 g2.setPaint(Color.black);
378 Path2D.Double p = new Path2D.Double();
379 p.moveTo(0, 60); p.curveTo(40, 40, 44, 100, 84, 80); p.moveTo(0, 60); p.quadTo(12, 80, 28, 72); p.moveTo(24, 56); p.quadTo(36, 36, 56, 44); p.quadTo(68, 28, 80, 36);
380 p.moveTo(56, 44); p.quadTo(68, 60, 80, 52); p.moveTo(52, 76); p.quadTo(72, 60, 96, 68); p.quadTo(108, 84, 120, 76); p.moveTo(96, 68); p.quadTo(108, 52, 120, 60);
381 p.moveTo(120, 180); p.curveTo(160, 160, 164, 220, 204, 200); p.moveTo(120, 180); p.quadTo(132, 200, 148, 192); p.moveTo(144, 176); p.quadTo(156, 156, 176, 164); p.quadTo(188, 148, 200, 156);
382 p.moveTo(176, 164); p.quadTo(188, 180, 200, 172); p.moveTo(172, 196); p.quadTo(192, 180, 216, 188); p.quadTo(228, 204, 240, 196); p.moveTo(216, 188); p.quadTo(228, 172, 240, 180);
383 g2.draw(p);
384 }
385
386 public static final Symbol KelpP = new Symbol();
387 static {
388 KelpP.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60, -60, 120, 120)));
389 KelpP.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
390 Path2D.Double p = new Path2D.Double();
391 p.moveTo(-60, 0); p.curveTo(-20, -20, -16, 40, 24, 20); p.moveTo(-60, 0); p.quadTo(-48, 20, -32, 12); p.moveTo(-36, -4); p.quadTo(-24, -24, -4, -16); p.quadTo(8, -32, 20, -24);
392 p.moveTo(-4, -16); p.quadTo(8, 0, 20, -8); p.moveTo(-8, 16); p.quadTo(12, 0, 36, 8); p.quadTo(48, 24, 60, 16); p.moveTo(36, 8); p.quadTo(48, -8, 60, 0);
393 KelpP.add(new Instr(Form.PLIN, p));
394 }
395}
Note: See TracBrowser for help on using the repository browser.