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.geom.Ellipse2D;
|
---|
15 | import java.awt.geom.GeneralPath;
|
---|
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 Beacons {
|
---|
24 | public static final ArrayList<Instr> Beacon = new ArrayList<Instr>();
|
---|
25 | static {
|
---|
26 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
27 | Path2D.Double p = new Path2D.Double(); p.moveTo(-6.0,-8.5); p.lineTo(-6.0,-70.0); p.lineTo(6.0,-70.0); p.lineTo(6.0,-8.5); p.curveTo(6.0,-10.0,-6.0,-10.0,-6.0,-8.5); p.closePath();
|
---|
28 | colours.add(new Instr(Prim.P1, p));
|
---|
29 | p = new Path2D.Double(); p.moveTo(-6.0,-8.5); p.lineTo(-6.0,-40.0); p.lineTo(6.0,-40.0); p.lineTo(6.0,-8.5); p.curveTo(6.0,-10.0,-6.0,-10.0,-6.0,-8.5); p.closePath();
|
---|
30 | colours.add(new Instr(Prim.H2, p));
|
---|
31 | p = new Path2D.Double(); p.moveTo(-6.0,-30.0); p.lineTo(-6.0,-50.0); p.lineTo(6.0,-50.0); p.lineTo(6.0,-30.0); p.closePath();
|
---|
32 | colours.add(new Instr(Prim.H3, p));
|
---|
33 | p = new Path2D.Double(); p.moveTo(-6.0,-40.0); p.lineTo(-6.0,-55.0); p.lineTo(6.0,-55.0); p.lineTo(6.0,-40.0); p.closePath();
|
---|
34 | colours.add(new Instr(Prim.H4, p));
|
---|
35 | p = new Path2D.Double(); p.moveTo(-6.0,-25.0); p.lineTo(-6.0,-40.0); p.lineTo(6.0,-40.0); p.lineTo(6.0,-25.0); p.closePath();
|
---|
36 | colours.add(new Instr(Prim.H5, p));
|
---|
37 | p = new Path2D.Double(); p.moveTo(0.0,-70.0); p.lineTo(6.0,-70.0); p.lineTo(6.0,-8.5); p.quadTo(3.0,-9.3,0.0,-10.0); p.closePath();
|
---|
38 | colours.add(new Instr(Prim.V2, p));
|
---|
39 | Beacon.add(new Instr(Prim.COLR, colours));
|
---|
40 | Beacon.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
41 | Beacon.add(new Instr(Prim.FILL, Color.black));
|
---|
42 | Beacon.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
|
---|
43 | Beacon.add(new Instr(Prim.LINE, new Line2D.Double(-20,0,-10,0)));
|
---|
44 | Beacon.add(new Instr(Prim.LINE, new Line2D.Double(10,0,20,0)));
|
---|
45 | p = new Path2D.Double(); p.moveTo(-6.0,-8.5); p.lineTo(-6.0,-70.0); p.lineTo(6.0,-70.0); p.lineTo(6.0,-8.5);
|
---|
46 | Beacon.add(new Instr(Prim.PLIN, p));
|
---|
47 | }
|
---|
48 | public static final ArrayList<Instr> Cairn = new ArrayList<Instr>();
|
---|
49 | static {
|
---|
50 | Cairn.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
51 | Cairn.add(new Instr(Prim.FILL, Color.black));
|
---|
52 | Cairn.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
|
---|
53 | Cairn.add(new Instr(Prim.LINE, new Line2D.Double(-40,0,-10,0)));
|
---|
54 | Cairn.add(new Instr(Prim.LINE, new Line2D.Double(10,0,40,0)));
|
---|
55 | Cairn.add(new Instr(Prim.ELPS, new Ellipse2D.Double(3,-40,40,40)));
|
---|
56 | Cairn.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-43,-40,40,40)));
|
---|
57 | Cairn.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-18,-70,36,36)));
|
---|
58 | }
|
---|
59 | public static final ArrayList<Instr> LightMajor = new ArrayList<Instr>();
|
---|
60 | static {
|
---|
61 | Path2D.Double p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_NON_ZERO);
|
---|
62 | p.moveTo(0.0,-7.0); p.curveTo(-9.3,-6.5,-9.3,6.5,0.0,7.0); p.curveTo(9.3,6.5,9.3,-6.5,0.0,-7.0); p.closePath();
|
---|
63 | p.moveTo(0.0,-35.5); p.lineTo(8.0,-11.2); p.lineTo(33.5,-11.2); p.lineTo(12.8,4.0);
|
---|
64 | p.lineTo(20.5,28.5); p.lineTo(0.0,13.0); p.lineTo(-20.5,28.5); p.lineTo(-12.8,4.0); p.lineTo(-33.5,-11.2); p.lineTo(-8.0,-11.2); p.closePath();
|
---|
65 | LightMajor.add(new Instr(Prim.PGON, p));
|
---|
66 | }
|
---|
67 | public static final ArrayList<Instr> LightMinor = new ArrayList<Instr>();
|
---|
68 | static {
|
---|
69 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-26.5); p.lineTo(6.0,-8.4); p.lineTo(25.1,-8.4); p.lineTo(9.6,3.0);
|
---|
70 | p.lineTo(15.4,21.4); p.lineTo(0.0,9.8); p.lineTo(-15.4,21.4); p.lineTo(-9.6,3.0); p.lineTo(-25.1,-8.4); p.lineTo(-6.0,-8.4); p.closePath();
|
---|
71 | LightMinor.add(new Instr(Prim.PGON, p));
|
---|
72 | }
|
---|
73 | public static final ArrayList<Instr> PerchPort = new ArrayList<Instr>();
|
---|
74 | static {
|
---|
75 | PerchPort.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
76 | PerchPort.add(new Instr(Prim.FILL, Color.black));
|
---|
77 | PerchPort.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0)));
|
---|
78 | PerchPort.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-40)));
|
---|
79 | PerchPort.add(new Instr(Prim.LINE, new Line2D.Double(25,-70,0,-40)));
|
---|
80 | PerchPort.add(new Instr(Prim.LINE, new Line2D.Double(-25,-70,0,-40)));
|
---|
81 | }
|
---|
82 | public static final ArrayList<Instr> PerchStarboard = new ArrayList<Instr>();
|
---|
83 | static {
|
---|
84 | PerchStarboard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
85 | PerchStarboard.add(new Instr(Prim.FILL, Color.black));
|
---|
86 | PerchStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0)));
|
---|
87 | PerchStarboard.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-70)));
|
---|
88 | PerchStarboard.add(new Instr(Prim.LINE, new Line2D.Double(25,-40,0,-68.7)));
|
---|
89 | PerchStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-25,-40,0,-68.7)));
|
---|
90 | }
|
---|
91 | public static final ArrayList<Instr> Stake = new ArrayList<Instr>();
|
---|
92 | static {
|
---|
93 | Stake.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
94 | Stake.add(new Instr(Prim.FILL, Color.black));
|
---|
95 | Stake.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-70)));
|
---|
96 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
97 | Path2D.Double p = new Path2D.Double(); p.moveTo(-2.0,0.0); p.lineTo(-2.0,-70.0); p.lineTo(2.0,-70.0); p.lineTo(2.0,0.0); p.closePath();
|
---|
98 | colours.add(new Instr(Prim.P1, p));
|
---|
99 | p = new Path2D.Double(); p.moveTo(-2.0,0.0); p.lineTo(-2.0,-35.0); p.lineTo(2.0,-35.0); p.lineTo(2.0,0.0); p.closePath();
|
---|
100 | colours.add(new Instr(Prim.H2, p));
|
---|
101 | p = new Path2D.Double(); p.moveTo(-2.0,-23.3); p.lineTo(-2.0,-46.7); p.lineTo(2.0,-46.7); p.lineTo(2.0,-23.3); p.closePath();
|
---|
102 | colours.add(new Instr(Prim.H3, p));
|
---|
103 | p = new Path2D.Double(); p.moveTo(-2.0,-35.0); p.lineTo(-2.0,-52.5); p.lineTo(2.0,-52.5); p.lineTo(2.0,-35.0); p.closePath();
|
---|
104 | colours.add(new Instr(Prim.H4, p));
|
---|
105 | p = new Path2D.Double(); p.moveTo(-2.0,-17.5); p.lineTo(-2.0,-35.0); p.lineTo(2.0,-35.0); p.lineTo(2.0,-17.5); p.closePath();
|
---|
106 | colours.add(new Instr(Prim.H5, p));
|
---|
107 | Stake.add(new Instr(Prim.COLR, colours));
|
---|
108 | Stake.add(new Instr(Prim.FILL, Color.black));
|
---|
109 | Stake.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0)));
|
---|
110 | }
|
---|
111 | public static final ArrayList<Instr> Tower = new ArrayList<Instr>();
|
---|
112 | static {
|
---|
113 | ArrayList<Instr> colours = new ArrayList<Instr>();
|
---|
114 | Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-20.0,-70.0); p.lineTo(20.0,-70.0); p.lineTo(25.0,0.0); p.lineTo(10.0,0.0); p.curveTo(10.0,-13.3,-10.0,-13.3,-10.0,0.0); p.closePath();
|
---|
115 | colours.add(new Instr(Prim.P1, p));
|
---|
116 | p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-22.5,-35.0); p.lineTo(22.5,-35.0); p.lineTo(25.0,0.0); p.lineTo(10.0,0.0); p.curveTo(10.0,-13.3,-10.0,-13.3,-10.0,0.0); p.closePath();
|
---|
117 | colours.add(new Instr(Prim.H2, p));
|
---|
118 | p = new Path2D.Double(); p.moveTo(-23.3,-23.3); p.lineTo(-21.7,-46.7); p.lineTo(21.7,-46.7); p.lineTo(23.3,-23.3); p.closePath();
|
---|
119 | colours.add(new Instr(Prim.H3, p));
|
---|
120 | p = new Path2D.Double(); p.moveTo(-22.5,-35.0); p.lineTo(-21.0,-52.5); p.lineTo(21.0,-52.5); p.lineTo(22.5,-35.0); p.closePath();
|
---|
121 | colours.add(new Instr(Prim.H4, p));
|
---|
122 | p = new Path2D.Double(); p.moveTo(-23.6,-17.5); p.lineTo(-22.5,-35.0); p.lineTo(22.5,-35.0); p.lineTo(23.6,-17.5); p.closePath();
|
---|
123 | colours.add(new Instr(Prim.H5, p));
|
---|
124 | p = new Path2D.Double(); p.moveTo(0.0,-70.0); p.lineTo(20.0,-70.0); p.lineTo(25.0,0.0); p.lineTo(10.0,0.0); p.quadTo(10.0,-10.0,0.0,-10.0); p.closePath();
|
---|
125 | colours.add(new Instr(Prim.V2, p));
|
---|
126 | Tower.add(new Instr(Prim.COLR, colours));
|
---|
127 | Tower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
128 | Tower.add(new Instr(Prim.FILL, Color.black));
|
---|
129 | Tower.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
|
---|
130 | Tower.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));
|
---|
131 | Tower.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));
|
---|
132 | p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-20.0,-70.0); p.lineTo(20.0,-70.0); p.lineTo(25.0,0.0);
|
---|
133 | Tower.add(new Instr(Prim.PLIN, p));
|
---|
134 | }
|
---|
135 | public static final ArrayList<Instr> WithyPort = new ArrayList<Instr>();
|
---|
136 | static {
|
---|
137 | WithyPort.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
138 | WithyPort.add(new Instr(Prim.FILL, Color.black));
|
---|
139 | WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0)));
|
---|
140 | WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-70)));
|
---|
141 | WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(20,-60,0,-50)));
|
---|
142 | WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(-20,-60,0,-50)));
|
---|
143 | WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(30,-35,0,-21)));
|
---|
144 | WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(-30,-35,0,-21)));
|
---|
145 | }
|
---|
146 | public static final ArrayList<Instr> WithyStarboard = new ArrayList<Instr>();
|
---|
147 | static {
|
---|
148 | WithyStarboard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
149 | WithyStarboard.add(new Instr(Prim.FILL, Color.black));
|
---|
150 | WithyStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0)));
|
---|
151 | WithyStarboard.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-70)));
|
---|
152 | WithyStarboard.add(new Instr(Prim.LINE, new Line2D.Double(20,-50,0,-60)));
|
---|
153 | WithyStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-20,-50,0,-60)));
|
---|
154 | WithyStarboard.add(new Instr(Prim.LINE, new Line2D.Double(30,-21,0,-35)));
|
---|
155 | WithyStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-30,-21,0,-35)));
|
---|
156 | }
|
---|
157 | }
|
---|