source: osm/applications/editors/josm/plugins/seachart/src/symbols/Harbours.java@ 32101

Last change on this file since 32101 was 32101, checked in by malcolmh, 9 years ago

[SeaChart] finish notices

File size: 12.1 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.*;
15
16import symbols.Symbols.*;
17
18public class Harbours {
19 public static final Symbol Anchor = new Symbol();
20 static {
21 Anchor.add(new Instr(Form.BBOX, new Rectangle2D.Double(-60,-60,120,120)));
22 Anchor.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
23 Anchor.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-59,20,20)));
24 Path2D.Double p = new Path2D.Double(); p.moveTo(23.0,-40.0); p.lineTo(23.0,-30.0); p.lineTo(6.0,-30.0); p.lineTo(7.0,31.0); p.quadTo(21.0,29.0,31.0,22.0);
25 p.lineTo(27.0,18.0); p.lineTo(52.0,0.0); p.lineTo(45.0,35.0); p.lineTo(37.0,28.0); p.quadTo(25.0,39.0,7.0,43.0); p.lineTo(6.0,51.0);
26 p.lineTo(-6.0,51.0); p.lineTo(-7.0,43.0); p.quadTo(-25.0,39.0,-37.0,28.0); p.lineTo(-45.0,35.0); p.lineTo(-52.0,0.0); p.lineTo(-27.0,18.0);
27 p.lineTo(-31.0,22.0); p.quadTo(-21.0,29.0,-7.0,31.0); p.lineTo(-6.0,-30.0); p.lineTo(-23.0,-30.0); p.lineTo(-23.0,-40.0); p.closePath();
28 Anchor.add(new Instr(Form.PGON, p));
29 }
30 public static final Symbol Yacht = new Symbol();
31 static {
32 Yacht.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
33 Path2D.Double p = new Path2D.Double(); p.moveTo(-65.0,50.0); p.curveTo(-36.0,97.0,36.0,97.0,65.0,50.0); p.lineTo(3.0,50.0); p.lineTo(3.0,40.0); p.lineTo(55.0,30.0);
34 p.curveTo(32.0,4.0,25.0,-15.0,26.0,-52.0); p.lineTo(1.5,-40.0); p.lineTo(1.0,-64.0); p.lineTo(-2.0,-64.0); p.lineTo(-4.0,50.0); p.closePath();
35 p.moveTo(-50.0,45.0); p.curveTo(-55.0,3.0,-37.0,-28.5,-7.0,-46.0); p.curveTo(-28.0,-15.0,-26.0,11.0,-20.5,30.0); p.closePath();
36 Yacht.add(new Instr(Form.PGON, p));
37 }
38 public static final Symbol Anchorage = new Symbol();
39 static {
40 Anchorage.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.67, 0, 0, new Scheme(Symbols.Msymb), null)));
41 }
42 public static final Symbol Bollard = new Symbol();
43 static {
44 Bollard.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
45 Bollard.add(new Instr(Form.FILL, Color.white));
46 Ellipse2D.Double s = new Ellipse2D.Double(-10,-10,20,20);
47 Bollard.add(new Instr(Form.RSHP, s));
48 Bollard.add(new Instr(Form.FILL, Color.black));
49 Bollard.add(new Instr(Form.ELPS, s));
50 }
51 public static final Symbol CallPoint1 = new Symbol();
52 static {
53 CallPoint1.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50,-50,100,100)));
54 CallPoint1.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
55 CallPoint1.add(new Instr(Form.FILL, Symbols.Msymb));
56 CallPoint1.add(new Instr(Form.ELPS, new Ellipse2D.Double(-25,-25,50,50)));
57 Path2D.Double p = new Path2D.Double(); p.moveTo(-16.0,-20.0); p.lineTo(0.0,-50.0); p.lineTo(16.0,-20.0);
58 CallPoint1.add(new Instr(Form.PLIN, p));
59 }
60 public static final Symbol CallPoint2 = new Symbol();
61 static {
62 CallPoint2.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50,-50,100,100)));
63 CallPoint2.add(new Instr(Form.SYMB, new Symbols.SubSymbol(CallPoint1, 1.0, 0, 0, null, null)));
64 Path2D.Double p = new Path2D.Double(); p.moveTo(-16.0,20.0); p.lineTo(0.0,50.0); p.lineTo(16.0,20.0);
65 CallPoint2.add(new Instr(Form.PLIN, p));
66 }
67 public static final Symbol ContainerCrane = new Symbol();
68 static {
69 ContainerCrane.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
70 ContainerCrane.add(new Instr(Form.RSHP, new Rectangle2D.Double(-15,-65,30,100)));
71 ContainerCrane.add(new Instr(Form.RECT, new Rectangle2D.Double(-40,-12.5,80,25)));
72 }
73 public static final Symbol Customs = new Symbol();
74 static {
75 Customs.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60)));
76 Customs.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
77 Customs.add(new Instr(Form.ELPS, new Ellipse2D.Double(-28,-28,56,56)));
78 Customs.add(new Instr(Form.LINE, new Line2D.Double(-25,5,25,5)));
79 Customs.add(new Instr(Form.LINE, new Line2D.Double(-25,-5,25,-5)));
80 }
81 public static final Symbol DeviationDolphin = new Symbol();
82 static {
83 DeviationDolphin.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
84 Path2D.Double p = new Path2D.Double(); p.moveTo(-30.0,0.0); p.lineTo(30.0,0.0); p.moveTo(0.0,0.0); p.lineTo(0.0,-40.0);
85 p.moveTo(-20.0,0.0); p.lineTo(-15.0,-32.0); p.lineTo(15.0,-32.0); p.lineTo(20.0,0.0);
86 DeviationDolphin.add(new Instr(Form.PLIN, p));
87 }
88 public static final Symbol DistanceI = new Symbol();
89 static {
90 DistanceI.add(new Instr(Form.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
91 DistanceI.add(new Instr(Form.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
92 }
93 public static final Symbol DistanceU = new Symbol();
94 static {
95 DistanceU.add(new Instr(Form.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
96 DistanceU.add(new Instr(Form.FILL, Symbols.Msymb));
97 DistanceU.add(new Instr(Form.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
98 }
99 public static final Symbol Dolphin = new Symbol();
100 static {
101 Dolphin.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
102 Dolphin.add(new Instr(Form.FILL, new Color(0xffd400)));
103 Path2D.Double p = new Path2D.Double(); p.moveTo(3.8,-9.2); p.lineTo(9.2,-3.8); p.lineTo(9.2,3.8); p.lineTo(3.8,9.2);
104 p.lineTo(-3.8,9.2); p.lineTo(-9.2,3.8); p.lineTo(-9.2,-3.8); p.lineTo(-3.8,-9.2); p.closePath();
105 Dolphin.add(new Instr(Form.PGON, p));
106 Dolphin.add(new Instr(Form.FILL, Color.black));
107 Dolphin.add(new Instr(Form.PLIN, p));
108 }
109 public static final Symbol Explosives = new Symbol();
110 static {
111 Explosives.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60)));
112 Explosives.add(new Instr(Form.RSHP, new Ellipse2D.Double(-5,25,10,10)));
113 Explosives.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
114 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,20); p.lineTo(-13,17); p.lineTo(-13,8);
115 p.moveTo(0,10); p.lineTo(0,0); p.lineTo(-8,-10);
116 p.moveTo(10,17); p.lineTo(18,-10); p.lineTo(10,-20);
117 Explosives.add(new Instr(Form.PLIN, p));
118 }
119 public static final Symbol Fishing = new Symbol();
120 static {
121 Fishing.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
122 Fishing.add(new Instr(Form.FILL, Symbols.Msymb));
123 Fishing.add(new Instr(Form.EARC, new Arc2D.Double(-50,-50,100,100,15,140,Arc2D.OPEN)));
124 Fishing.add(new Instr(Form.EARC, new Arc2D.Double(-50,-50,100,100,-15,-140,Arc2D.OPEN)));
125 Path2D.Double p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD);
126 p.moveTo(-24,3); p.curveTo(12,24,30,15,48,0); p.curveTo(30,-15,12,-24,-24,-3);
127 p.lineTo(-45,-15); p.quadTo(-48, 0, -45, 15); p.closePath();
128 p.moveTo(25, 0); p.curveTo(25, 6, 34, 6, 34, 0); p.curveTo(34, -6, 25, -6, 25, 0); p.closePath();
129 Fishing.add(new Instr(Form.PGON, p));
130 }
131 public static final Symbol Harbour = new Symbol();
132 static {
133 Harbour.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
134 Harbour.add(new Instr(Form.FILL, Symbols.Msymb));
135 Harbour.add(new Instr(Form.ELPS, new Ellipse2D.Double(-50,-50,100,100)));
136 Harbour.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.6, 0, 0, new Scheme(Symbols.Msymb), null)));
137 }
138 public static final Symbol HarbourMaster = new Symbol();
139 static {
140 HarbourMaster.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60)));
141 HarbourMaster.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
142 HarbourMaster.add(new Instr(Form.ELPS, new Ellipse2D.Double(-24,-28,48,56)));
143 HarbourMaster.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, null, null)));
144 }
145 public static final Symbol Hospital = new Symbol();
146 static {
147 Hospital.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60)));
148 Hospital.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
149 Hospital.add(new Instr(Form.ELPS, new Ellipse2D.Double(-28,-28,56,56)));
150 Path2D.Double p = new Path2D.Double(); p.moveTo(-26,-5); p.lineTo(-5,-5); p.lineTo(-5,-25); p.moveTo(5,-25); p.lineTo(5,-5); p.lineTo(25,-5);
151 p.moveTo(-25,5); p.lineTo(-5,5); p.lineTo(-5,25); p.moveTo(5,25); p.lineTo(5,5); p.lineTo(25,5);
152 Hospital.add(new Instr(Form.PLIN, p));
153 }
154 public static final Symbol LandingSteps = new Symbol();
155 static {
156 LandingSteps.add(new Instr(Form.FILL, Symbols.Msymb));
157 Path2D.Double p = new Path2D.Double(); p.moveTo(-20,-10); p.lineTo(10,20); p.lineTo(20,20); p.lineTo(20,10);
158 p.lineTo(10,10); p.lineTo(10,0); p.lineTo(0,0); p.lineTo(0,-10); p.lineTo(-10,-10); p.lineTo(-10,-20); p.lineTo(-20,-20); p.closePath();
159 LandingSteps.add(new Instr(Form.PGON, p));
160 }
161 public static final Symbol Marina = new Symbol();
162 static {
163 Marina.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
164 Marina.add(new Instr(Form.FILL, Symbols.Msymb));
165 Marina.add(new Instr(Form.EARC, new Arc2D.Double(-50.0,-50.0,100.0,100.0,215.0,-250.0,Arc2D.OPEN)));
166 Marina.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 0.6, 0, 0, new Scheme(Symbols.Msymb), null)));
167 }
168 public static final Symbol MarinaNF = new Symbol();
169 static {
170 MarinaNF.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 0.6, 0, 0, new Scheme(Symbols.Msymb), null)));
171 }
172 public static final Symbol Pilot = new Symbol();
173 static{
174 Pilot.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
175 Pilot.add(new Instr(Form.FILL, new Color(0xd400d4)));
176 Path2D.Double p = new Path2D.Double(); p.moveTo(-15,0); p.lineTo(0,-56); p.lineTo(15,0); p.lineTo(0,56); p.closePath();
177 Pilot.add(new Instr(Form.PGON, p));
178 Pilot.add(new Instr(Form.ELPS, new Ellipse2D.Double(-58,-58,116,116)));
179 }
180 public static final Symbol PortCrane = new Symbol();
181 static {
182 PortCrane.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
183 PortCrane.add(new Instr(Form.EARC, new Arc2D.Double(-36.0,-36.0,72.0,72.0,70.0,-320.0,Arc2D.OPEN)));
184 PortCrane.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-60)));
185 }
186 public static final Symbol Post = new Symbol();
187 static {
188 Post.add(new Instr(Form.RSHP, new Ellipse2D.Double(-10,-10,20,20)));
189 }
190 public static final Symbol Rescue = new Symbol();
191 static{
192 Rescue.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-50,40,100)));
193 Rescue.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
194 Path2D.Double p = new Path2D.Double(); p.moveTo(-11,0); p.lineTo(0,-43); p.lineTo(11,0); p.lineTo(0,43); p.closePath();
195 Rescue.add(new Instr(Form.PGON, p));
196 Rescue.add(new Instr(Form.LINE, new Line2D.Double(-15,0,15,0)));
197 }
198 public static final Symbol SignalStation = new Symbol();
199 static {
200 SignalStation.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
201 SignalStation.add(new Instr(Form.ELPS, new Ellipse2D.Double(-25,-25,50,50)));
202 SignalStation.add(new Instr(Form.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
203 }
204 public static final Symbol TideGauge = new Symbol();
205 static {
206 TideGauge.add(new Instr(Form.STRK, new BasicStroke(3, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
207 TideGauge.add(new Instr(Form.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
208 TideGauge.add(new Instr(Form.LINE, new Line2D.Double(-10,0,-30,0)));
209 TideGauge.add(new Instr(Form.LINE, new Line2D.Double(10,0,30,0)));
210 TideGauge.add(new Instr(Form.LINE, new Line2D.Double(0,-10,0,-80)));
211 TideGauge.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
212 TideGauge.add(new Instr(Form.LINE, new Line2D.Double(-15,-25,15,-25)));
213 TideGauge.add(new Instr(Form.LINE, new Line2D.Double(-25,-45,25,-45)));
214 TideGauge.add(new Instr(Form.LINE, new Line2D.Double(-15,-65,15,-65)));
215 }
216}
Note: See TracBrowser for help on using the repository browser.