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.Arc2D;
|
---|
15 | import java.awt.geom.Ellipse2D;
|
---|
16 | import java.awt.geom.Line2D;
|
---|
17 | import java.awt.geom.Path2D;
|
---|
18 | import java.awt.geom.Rectangle2D;
|
---|
19 | import java.util.ArrayList;
|
---|
20 |
|
---|
21 | import symbols.Symbols.Instr;
|
---|
22 | import symbols.Symbols.Prim;
|
---|
23 |
|
---|
24 | public class Landmarks {
|
---|
25 | private static final ArrayList<Instr> Base = new ArrayList<Instr>();
|
---|
26 | static {
|
---|
27 | Base.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
28 | Base.add(new Instr(Prim.FILL, Color.black));
|
---|
29 | Base.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
|
---|
30 | Base.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0)));
|
---|
31 | Base.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0)));
|
---|
32 | }
|
---|
33 |
|
---|
34 | public static final ArrayList<Instr> Chimney = new ArrayList<Instr>();
|
---|
35 | static {
|
---|
36 | Chimney.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
37 | Chimney.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
38 | Chimney.add(new Instr(Prim.FILL, Color.black));
|
---|
39 | Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-10.0,-120.0); p.lineTo(10.0,-120.0); p.lineTo(25.0,0.0);
|
---|
40 | p.moveTo(-10.0,-128.0); p.curveTo(-13.0,-147.0,15.0,-159.0,20.0,-148.0);
|
---|
41 | p.moveTo(16.0,-152.3); p.curveTo(58.0,-194.0,98.0,-87.0,16.0,-132.0);
|
---|
42 | p.moveTo(11.0,-128.0); p.curveTo(13.4,-132.0,20.0,-132.0,20.0,-136.0);
|
---|
43 | Chimney.add(new Instr(Prim.PLIN, p));
|
---|
44 | }
|
---|
45 | public static final ArrayList<Instr> Church = new ArrayList<Instr>();
|
---|
46 | static {
|
---|
47 | Church.add(new Instr(Prim.FILL, Color.black));
|
---|
48 | Path2D.Double p = new Path2D.Double(); p.moveTo(10.0,-10.0); p.lineTo(37.0,-10.0); p.quadTo(48.0,-10.0,48.0,-21.0); p.lineTo(50.0,-21.0); p.lineTo(50.0,21.0);
|
---|
49 | p.lineTo(48.0,21.0); p.quadTo(48.0,10.0,37.0,10.0); p.lineTo(10.0,10.0); p.lineTo(10.0,37.0); p.quadTo(10.0,48.0,21.0,48.0); p.lineTo(21.0,50.0);
|
---|
50 | p.lineTo(-21.0,50.0); p.lineTo(-21.0,48.0); p.quadTo(-10.0,48.0,-10.0,37.0); p.lineTo(-10.0,10.0); p.lineTo(-37.0,10.0); p.quadTo(-48.0,10.0,-48.0,21.0);
|
---|
51 | p.lineTo(-50.0,21.0); p.lineTo(-50.0,-21.0); p.lineTo(-48.0,-21.0); p.quadTo(-48.0,-10.0,-37.0,-10.0); p.lineTo(-10.0,-10.0); p.lineTo(-10.0,-37.0);
|
---|
52 | p.quadTo(-10.0,-48.0,-21.0,-48.0); p.lineTo(-21.0,-50.0); p.lineTo(21.0,-50.0); p.lineTo(21.0,-48.0); p.quadTo(10.0,-48.0,10.0,-37.0); p.closePath();
|
---|
53 | Church.add(new Instr(Prim.PGON, p));
|
---|
54 | }
|
---|
55 | public static final ArrayList<Instr> ChurchTower = new ArrayList<Instr>();
|
---|
56 | static {
|
---|
57 | ChurchTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
58 | ChurchTower.add(new Instr(Prim.FILL, Color.black));
|
---|
59 | ChurchTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-36,-36,72,72)));
|
---|
60 | ChurchTower.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-2,-2,4,4)));
|
---|
61 | }
|
---|
62 | public static final ArrayList<Instr> Cross = new ArrayList<Instr>();
|
---|
63 | static {
|
---|
64 | Cross.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
65 | Cross.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
66 | Cross.add(new Instr(Prim.FILL, Color.black));
|
---|
67 | Cross.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-150)));
|
---|
68 | Cross.add(new Instr(Prim.LINE, new Line2D.Double(-30,-115,30,-115)));
|
---|
69 | }
|
---|
70 | public static final ArrayList<Instr> DishAerial = new ArrayList<Instr>();
|
---|
71 | static {
|
---|
72 | DishAerial.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
73 | DishAerial.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)));
|
---|
74 | DishAerial.add(new Instr(Prim.FILL, Color.black));
|
---|
75 | Path2D.Double p = new Path2D.Double(); p.moveTo(-7.8,-6.0); p.lineTo(0.0,-62.0); p.lineTo(7.8,-6.0); p.moveTo(18.0,-109.0); p.lineTo(25.0,-113.0);
|
---|
76 | p.moveTo(-9.5,-157.0); p.curveTo(-60.7,-125.5,-16.5,-33.9,44.9,-61.7); p.closePath();
|
---|
77 | DishAerial.add(new Instr(Prim.PLIN, p));
|
---|
78 | }
|
---|
79 | public static final ArrayList<Instr> Dome = new ArrayList<Instr>();
|
---|
80 | static {
|
---|
81 | Dome.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
82 | Dome.add(new Instr(Prim.FILL, Color.black));
|
---|
83 | Dome.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-36,-36,72,72)));
|
---|
84 | Dome.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
|
---|
85 | }
|
---|
86 | public static final ArrayList<Instr> Flagstaff = new ArrayList<Instr>();
|
---|
87 | static {
|
---|
88 | Flagstaff.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
89 | Flagstaff.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
90 | Flagstaff.add(new Instr(Prim.FILL, Color.black));
|
---|
91 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(0.0,-150.0); p.moveTo(0.0,-140.0); p.lineTo(40.0,-140.0); p.lineTo(40.0,-100.0); p.lineTo(0.0,-100.0);
|
---|
92 | Flagstaff.add(new Instr(Prim.PLIN, p));
|
---|
93 | }
|
---|
94 | public static final ArrayList<Instr> FlareStack = new ArrayList<Instr>();
|
---|
95 | static {
|
---|
96 | FlareStack.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
97 | FlareStack.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
98 | FlareStack.add(new Instr(Prim.FILL, Color.black));
|
---|
99 | Path2D.Double p = new Path2D.Double(); p.moveTo(-7.8,-6.0); p.lineTo(-7.8,-100.0); p.lineTo(7.8,-100.0); p.lineTo(7.8,-6.0);
|
---|
100 | FlareStack.add(new Instr(Prim.PLIN, p));
|
---|
101 | FlareStack.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
---|
102 | p = new Path2D.Double(); p.moveTo(21.6,-169.6); p.curveTo(-22.0,-132.4,-27.4,-103.5,3.0,-100.0); p.curveTo(39.0,-118.0,-4.0,-141.0,21.6,-169.6);
|
---|
103 | FlareStack.add(new Instr(Prim.PLIN, p));
|
---|
104 | }
|
---|
105 | public static final ArrayList<Instr> LandTower = new ArrayList<Instr>();
|
---|
106 | static {
|
---|
107 | LandTower.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
108 | LandTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
109 | LandTower.add(new Instr(Prim.FILL, Color.black));
|
---|
110 | LandTower.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-120)));
|
---|
111 | LandTower.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-120)));
|
---|
112 | LandTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-15,-150,30,30)));
|
---|
113 | }
|
---|
114 | public static final ArrayList<Instr> Mast = new ArrayList<Instr>();
|
---|
115 | static {
|
---|
116 | Mast.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
117 | Mast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)));
|
---|
118 | Mast.add(new Instr(Prim.FILL, Color.black));
|
---|
119 | Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(0.0,-150.0); p.lineTo(25.0,0.0);
|
---|
120 | Mast.add(new Instr(Prim.PLIN, p));
|
---|
121 | }
|
---|
122 | public static final ArrayList<Instr> RadioMast = new ArrayList<Instr>();
|
---|
123 | static {
|
---|
124 | RadioMast.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Mast, 1.0, 0, 0, null, null)));
|
---|
125 | RadioMast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL)));
|
---|
126 | RadioMast.add(new Instr(Prim.FILL, Color.black));
|
---|
127 | RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-30.0,-180.0,60.0,60.0,45.0,-90.0,Arc2D.OPEN)));
|
---|
128 | RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,45.0,-90.0,Arc2D.OPEN)));
|
---|
129 | RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-30.0,-180.0,60.0,60.0,225.0,-90.0,Arc2D.OPEN)));
|
---|
130 | RadioMast.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,225.0,-90.0,Arc2D.OPEN)));
|
---|
131 | }
|
---|
132 | public static final ArrayList<Instr> Monument = new ArrayList<Instr>();
|
---|
133 | static {
|
---|
134 | Monument.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
135 | Monument.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
|
---|
136 | Monument.add(new Instr(Prim.FILL, Color.black));
|
---|
137 | Monument.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-105)));
|
---|
138 | Monument.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-105)));
|
---|
139 | Monument.add(new Instr(Prim.EARC, new Arc2D.Double(-25.0,-150.0,50.0,50.0,233.0,-285.0,Arc2D.OPEN)));
|
---|
140 | }
|
---|
141 | public static final ArrayList<Instr> Platform = new ArrayList<Instr>();
|
---|
142 | static {
|
---|
143 | Platform.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
144 | Platform.add(new Instr(Prim.FILL, Color.black));
|
---|
145 | Platform.add(new Instr(Prim.RECT, new Rectangle2D.Double(-48,-48,96,96)));
|
---|
146 | Platform.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
|
---|
147 | }
|
---|
148 | public static final ArrayList<Instr> Spire = new ArrayList<Instr>();
|
---|
149 | static {
|
---|
150 | Spire.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
151 | Spire.add(new Instr(Prim.FILL, Color.black));
|
---|
152 | Spire.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-25,-25,50,50)));
|
---|
153 | Spire.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
|
---|
154 | }
|
---|
155 | public static final ArrayList<Instr> Minaret = new ArrayList<Instr>();
|
---|
156 | static {
|
---|
157 | Minaret.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Spire, 1.0, 0, 0, null, null)));
|
---|
158 | Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
159 | Minaret.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-50)));
|
---|
160 | Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
|
---|
161 | Minaret.add(new Instr(Prim.EARC, new Arc2D.Double(-40.0,-110.0,80.0,60.0,180.0,180.0,Arc2D.OPEN)));
|
---|
162 | }
|
---|
163 | public static final ArrayList<Instr> Temple = new ArrayList<Instr>();
|
---|
164 | static {
|
---|
165 | Temple.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
166 | Temple.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-15,50,30)));
|
---|
167 | Temple.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
168 | Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,-21,35,21)));
|
---|
169 | Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,21,35,-21)));
|
---|
170 | }
|
---|
171 | public static final ArrayList<Instr> WaterTower = new ArrayList<Instr>();
|
---|
172 | static {
|
---|
173 | WaterTower.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
174 | WaterTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
175 | WaterTower.add(new Instr(Prim.FILL, Color.black));
|
---|
176 | WaterTower.add(new Instr(Prim.LINE, new Line2D.Double(-25,0,-15,-120)));
|
---|
177 | WaterTower.add(new Instr(Prim.LINE, new Line2D.Double(25,0,15,-120)));
|
---|
178 | WaterTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-150,50,30)));
|
---|
179 | }
|
---|
180 | public static final ArrayList<Instr> WindMotor = new ArrayList<Instr>();
|
---|
181 | static {
|
---|
182 | WindMotor.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
183 | WindMotor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
|
---|
184 | WindMotor.add(new Instr(Prim.FILL, Color.black));
|
---|
185 | WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-90)));
|
---|
186 | WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,30,-90)));
|
---|
187 | WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14,-116.6)));
|
---|
188 | WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14.3,-66.7)));
|
---|
189 | }
|
---|
190 | public static final ArrayList<Instr> Windmill = new ArrayList<Instr>();
|
---|
191 | static {
|
---|
192 | Windmill.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
193 | Windmill.add(new Instr(Prim.FILL, Color.black));
|
---|
194 | Windmill.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-12,-12,24,24)));
|
---|
195 | Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,-42,30,10)));
|
---|
196 | Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,10,30,-42)));
|
---|
197 | }
|
---|
198 | public static final ArrayList<Instr> Windsock = new ArrayList<Instr>();
|
---|
199 | static {
|
---|
200 | Windsock.add(new Instr(Prim.SYMB, new Symbols.Symbol(Landmarks.Base, 1.0, 0, 0, null, null)));
|
---|
201 | Windsock.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
|
---|
202 | Windsock.add(new Instr(Prim.FILL, Color.black));
|
---|
203 | Windsock.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-100)));
|
---|
204 | Windsock.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
|
---|
205 | Windsock.add(new Instr(Prim.LINE, new Line2D.Double(0,-100,0,-150)));
|
---|
206 | Windsock.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
|
---|
207 | Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-100.0); p.lineTo(10.0,-100.0); p.lineTo(10.0,-150.0); p.lineTo(0.0,-150.0);
|
---|
208 | p.moveTo(10.0,-150.0); p.lineTo(50.0,-145.0); p.lineTo(120.0,-70.0); p.quadTo(120.0,-55.0,105.0,-55.0);
|
---|
209 | p.lineTo(55,-95); p.lineTo(40,-102); p.lineTo(10,-100); p.moveTo(40,-102); p.lineTo(50,-120); p.moveTo(55,-95); p.lineTo(75,-97);
|
---|
210 | Windsock.add(new Instr(Prim.PLIN, p));
|
---|
211 | }
|
---|
212 | }
|
---|