| 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.Rectangle;
|
|---|
| 15 | import java.awt.geom.*;
|
|---|
| 16 | import java.util.ArrayList;
|
|---|
| 17 |
|
|---|
| 18 | import symbols.Symbols.*;
|
|---|
| 19 |
|
|---|
| 20 | public class Areas {
|
|---|
| 21 | public static final ArrayList<Instr> Plane = new ArrayList<Instr>();
|
|---|
| 22 | static {
|
|---|
| 23 | Plane.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120)));
|
|---|
| 24 | 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);
|
|---|
| 25 | 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();
|
|---|
| 26 | Plane.add(new Instr(Prim.PGON, p));
|
|---|
| 27 | }
|
|---|
| 28 | public static final ArrayList<Instr> Cable = new ArrayList<Instr>();
|
|---|
| 29 | static {
|
|---|
| 30 | Cable.add(new Instr(Prim.BBOX, new Rectangle(-30,-60,60,60)));
|
|---|
| 31 | Cable.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
|
|---|
| 32 | Cable.add(new Instr(Prim.FILL, new Color(0xc480ff)));
|
|---|
| 33 | 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);
|
|---|
| 34 | Cable.add(new Instr(Prim.PLIN, p));
|
|---|
| 35 | }
|
|---|
| 36 | public static final ArrayList<Instr> LaneArrow = new ArrayList<Instr>();
|
|---|
| 37 | static {
|
|---|
| 38 | LaneArrow.add(new Instr(Prim.STRK, new BasicStroke(10.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)));
|
|---|
| 39 | LaneArrow.add(new Instr(Prim.FILL, new Color(0x80c480ff, true)));
|
|---|
| 40 | Path2D.Double p = new Path2D.Double(); p.moveTo(15,0); p.lineTo(15,-195); p.lineTo(40,-195);
|
|---|
| 41 | p.lineTo(0,-240); p.lineTo(-40,-195); p.lineTo(-15,-195); p.lineTo(-15,0); p.closePath();
|
|---|
| 42 | LaneArrow.add(new Instr(Prim.PLIN, p));
|
|---|
| 43 | }
|
|---|
| 44 | public static final ArrayList<Instr> LineAnchor = new ArrayList<Instr>();
|
|---|
| 45 | static {
|
|---|
| 46 | LineAnchor.add(new Instr(Prim.FILL, new Color(0xc480ff)));
|
|---|
| 47 | LineAnchor.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null)));
|
|---|
| 48 | }
|
|---|
| 49 | public static final ArrayList<Instr> LinePlane = new ArrayList<Instr>();
|
|---|
| 50 | static {
|
|---|
| 51 | LinePlane.add(new Instr(Prim.FILL, new Color(0xc480ff)));
|
|---|
| 52 | LinePlane.add(new Instr(Prim.SYMB, new Symbols.Symbol(Areas.Plane, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null)));
|
|---|
| 53 | }
|
|---|
| 54 | public static final ArrayList<Instr> MarineFarm = new ArrayList<Instr>();
|
|---|
| 55 | static {
|
|---|
| 56 | MarineFarm.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
|---|
| 57 | MarineFarm.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 58 | 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);
|
|---|
| 59 | 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);
|
|---|
| 60 | 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);
|
|---|
| 61 | MarineFarm.add(new Instr(Prim.PLIN, p));
|
|---|
| 62 | MarineFarm.add(new Instr(Prim.RSHP, new Ellipse2D.Double(9,-2,4,4)));
|
|---|
| 63 | }
|
|---|
| 64 | public static final ArrayList<Instr> NoWake = new ArrayList<Instr>();
|
|---|
| 65 | static {
|
|---|
| 66 | NoWake.add(new Instr(Prim.STRK, new BasicStroke(12.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 67 | NoWake.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
|---|
| 68 | 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);
|
|---|
| 69 | NoWake.add(new Instr(Prim.PLIN, p));
|
|---|
| 70 | NoWake.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 71 | NoWake.add(new Instr(Prim.LINE, new Line2D.Double(-60,60,60,-60)));
|
|---|
| 72 | NoWake.add(new Instr(Prim.LINE, new Line2D.Double(-60,-60,60,60)));
|
|---|
| 73 | }
|
|---|
| 74 | public static final ArrayList<Instr> Pipeline = new ArrayList<Instr>();
|
|---|
| 75 | static {
|
|---|
| 76 | Pipeline.add(new Instr(Prim.BBOX, new Rectangle(-15,-60,30,60)));
|
|---|
| 77 | Pipeline.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
|---|
| 78 | Pipeline.add(new Instr(Prim.FILL, new Color(0xc480ff)));
|
|---|
| 79 | Pipeline.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-50)));
|
|---|
| 80 | Pipeline.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-60,20,20)));
|
|---|
| 81 | }
|
|---|
| 82 | public static final ArrayList<Instr> Restricted = new ArrayList<Instr>();
|
|---|
| 83 | static {
|
|---|
| 84 | Restricted.add(new Instr(Prim.BBOX, new Rectangle(-15,-30,30,30)));
|
|---|
| 85 | Restricted.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
|
|---|
| 86 | Restricted.add(new Instr(Prim.FILL, new Color(0xc480ff)));
|
|---|
| 87 | Restricted.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-30)));
|
|---|
| 88 | Restricted.add(new Instr(Prim.LINE, new Line2D.Double(0,-15,17,-15)));
|
|---|
| 89 | }
|
|---|
| 90 | public static final ArrayList<Instr> Rock = new ArrayList<Instr>();
|
|---|
| 91 | static {
|
|---|
| 92 | Rock.add(new Instr(Prim.FILL, new Color(0x80c0ff)));
|
|---|
| 93 | Rock.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));
|
|---|
| 94 | Rock.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5,5}, 0)));
|
|---|
| 95 | Rock.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 96 | Rock.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-30,-30,60,60)));
|
|---|
| 97 | Rock.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 98 | Rock.add(new Instr(Prim.LINE, new Line2D.Double(-20,0,20,0)));
|
|---|
| 99 | Rock.add(new Instr(Prim.LINE, new Line2D.Double(0,-20,0,20)));
|
|---|
| 100 | }
|
|---|
| 101 | public static final ArrayList<Instr> RockA = new ArrayList<Instr>();
|
|---|
| 102 | static {
|
|---|
| 103 | RockA.add(new Instr(Prim.FILL, new Color(0x80c0ff)));
|
|---|
| 104 | RockA.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));
|
|---|
| 105 | RockA.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5,5}, 0)));
|
|---|
| 106 | RockA.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 107 | RockA.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-30,-30,60,60)));
|
|---|
| 108 | RockA.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 109 | RockA.add(new Instr(Prim.LINE, new Line2D.Double(-20,0,20,0)));
|
|---|
| 110 | RockA.add(new Instr(Prim.LINE, new Line2D.Double(0,-20,0,20)));
|
|---|
| 111 | RockA.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-17,-17,8,8)));
|
|---|
| 112 | RockA.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-17,9,8,8)));
|
|---|
| 113 | RockA.add(new Instr(Prim.RSHP, new Ellipse2D.Double(9,-17,8,8)));
|
|---|
| 114 | RockA.add(new Instr(Prim.RSHP, new Ellipse2D.Double(9,9,8,8)));
|
|---|
| 115 | }
|
|---|
| 116 | public static final ArrayList<Instr> RockC = new ArrayList<Instr>();
|
|---|
| 117 | static {
|
|---|
| 118 | RockC.add(new Instr(Prim.FILL, new Color(0x80c0ff)));
|
|---|
| 119 | RockC.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));
|
|---|
| 120 | RockC.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5,5}, 0)));
|
|---|
| 121 | RockC.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 122 | RockC.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-30,-30,60,60)));
|
|---|
| 123 | RockC.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 124 | RockC.add(new Instr(Prim.LINE, new Line2D.Double(-20,0,20,0)));
|
|---|
| 125 | RockC.add(new Instr(Prim.LINE, new Line2D.Double(-10,17.3,10,-17.3)));
|
|---|
| 126 | RockC.add(new Instr(Prim.LINE, new Line2D.Double(10,17.3,-10,-17.3)));
|
|---|
| 127 | }
|
|---|
| 128 | public static final ArrayList<Instr> Sandwaves = new ArrayList<Instr>();
|
|---|
| 129 | public static final ArrayList<Instr> Seaplane = new ArrayList<Instr>();
|
|---|
| 130 | static {
|
|---|
| 131 | Seaplane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 132 | Seaplane.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
|---|
| 133 | Seaplane.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-60,-60,120,120)));
|
|---|
| 134 | Seaplane.add(new Instr(Prim.SYMB, new Symbols.Symbol(Areas.Plane, 1.0, 0, 0, null, null)));
|
|---|
| 135 | }
|
|---|
| 136 | public static final ArrayList<Instr> WindFarm = new ArrayList<Instr>();
|
|---|
| 137 | static {
|
|---|
| 138 | WindFarm.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 139 | WindFarm.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 140 | WindFarm.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-100,-100,200,200)));
|
|---|
| 141 | WindFarm.add(new Instr(Prim.LINE, new Line2D.Double(-35,50,35,50)));
|
|---|
| 142 | WindFarm.add(new Instr(Prim.LINE, new Line2D.Double(0,50,0,-27.5)));
|
|---|
| 143 | WindFarm.add(new Instr(Prim.LINE, new Line2D.Double(0,-27.5,30,-27.5)));
|
|---|
| 144 | WindFarm.add(new Instr(Prim.LINE, new Line2D.Double(0,-27.5,-13.8,-3.8)));
|
|---|
| 145 | WindFarm.add(new Instr(Prim.LINE, new Line2D.Double(0,-27.5,-13.8,-53.6)));
|
|---|
| 146 | }
|
|---|
| 147 | public static final ArrayList<Instr> WreckD = new ArrayList<Instr>();
|
|---|
| 148 | static {
|
|---|
| 149 | WreckD.add(new Instr(Prim.FILL, new Color(0x80c0ff)));
|
|---|
| 150 | WreckD.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-50,-40,100,80)));
|
|---|
| 151 | WreckD.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[]{5,5}, 0)));
|
|---|
| 152 | WreckD.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 153 | WreckD.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-50,-40,100,80)));
|
|---|
| 154 | WreckD.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 155 | WreckD.add(new Instr(Prim.LINE, new Line2D.Double(-40,0,40,0)));
|
|---|
| 156 | WreckD.add(new Instr(Prim.LINE, new Line2D.Double(0,-30,0,30)));
|
|---|
| 157 | WreckD.add(new Instr(Prim.LINE, new Line2D.Double(-20,-15,-20,15)));
|
|---|
| 158 | WreckD.add(new Instr(Prim.LINE, new Line2D.Double(20,-15,20,15)));
|
|---|
| 159 | }
|
|---|
| 160 | public static final ArrayList<Instr> WreckND = new ArrayList<Instr>();
|
|---|
| 161 | static {
|
|---|
| 162 | WreckND.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 163 | WreckND.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 164 | WreckND.add(new Instr(Prim.LINE, new Line2D.Double(-40,0,40,0)));
|
|---|
| 165 | WreckND.add(new Instr(Prim.LINE, new Line2D.Double(0,-30,0,30)));
|
|---|
| 166 | WreckND.add(new Instr(Prim.LINE, new Line2D.Double(-20,-15,-20,15)));
|
|---|
| 167 | WreckND.add(new Instr(Prim.LINE, new Line2D.Double(20,-15,20,15)));
|
|---|
| 168 | }
|
|---|
| 169 | public static final ArrayList<Instr> WreckS = new ArrayList<Instr>();
|
|---|
| 170 | static {
|
|---|
| 171 | WreckS.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
|---|
| 172 | WreckS.add(new Instr(Prim.FILL, Color.black));
|
|---|
| 173 | WreckS.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-6,-6,12,12)));
|
|---|
| 174 | WreckS.add(new Instr(Prim.LINE, new Line2D.Double(-40,0,-6,0)));
|
|---|
| 175 | WreckS.add(new Instr(Prim.LINE, new Line2D.Double(40,0,6,0)));
|
|---|
| 176 | 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);
|
|---|
| 177 | 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();
|
|---|
| 178 | WreckS.add(new Instr(Prim.PGON, p));
|
|---|
| 179 | }
|
|---|
| 180 | }
|
|---|