Changeset 29082 in osm
- Timestamp:
- 2012-12-16T22:26:04+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/symbols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/symbols/Buoys.java
r29074 r29082 122 122 Float.add(new Instr(Prim.PLIN, p)); 123 123 } 124 125 public static final ArrayList<Instr> Ice = new ArrayList<Instr>(); 126 static { 127 ArrayList<Instr> colours = new ArrayList<Instr>(); 128 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,0); p.quadTo(-30.0,0.0,-30.0,-15.0); p.lineTo(-30.0,-25.0); p.lineTo(30.0,-25.0); p.lineTo(30.0,-15); p.quadTo(30.0,0.0,15.0,0.0); 129 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); 130 colours.add(new Instr(Prim.P1, p)); 131 Ice.add(new Instr(Prim.COLR, colours)); 132 Ice.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 133 Ice.add(new Instr(Prim.FILL, Color.black)); 134 Ice.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20))); 135 Ice.add(new Instr(Prim.LINE, new Line2D.Double(-35,0,-10,0))); 136 Ice.add(new Instr(Prim.LINE, new Line2D.Double(10,0,35,0))); 137 p = new Path2D.Double(); p.moveTo(-15.0,0); p.quadTo(-30.0,0.0,-30.0,-15.0); p.lineTo(-30.0,-25.0); p.lineTo(30.0,-25.0); p.lineTo(30.0,-15); p.quadTo(30.0,0.0,15.0,0.0); 138 Ice.add(new Instr(Prim.PLIN, p)); 139 p = new Path2D.Double(); p.moveTo(-6.0,8.0); p.lineTo(-6.0,40.0); p.lineTo(6.0,40.0); p.lineTo(6.0,8.0); 140 Ice.add(new Instr(Prim.PLIN, p)); 141 } 124 142 125 143 public static final ArrayList<Instr> Pillar = new ArrayList<Instr>(); -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r29074 r29082 23 23 24 24 public enum Prim { 25 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, SYMB, 26 P1, H2, H3, H4, H5, V2, D2, D3, D4, B2, S2, S3, S4, C2, X2 25 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, SYMB, P1, P2, H2, H3, H4, H5, V2, D2, D3, D4, B2, S2, S3, S4, C2, X2 27 26 } 28 27 … … 31 30 } 32 31 33 public static final double symbolScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 34 0.61, 0.372, 0.227, 0.138,0.0843, 0.0514, 0.0313, 0.0191, 0.0117, 0.007, 0.138 };35 36 public static final double textScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 37 0.5556, 0.3086, 0.1714, 0.0953,0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 };32 public static final double symbolScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.61, 0.372, 0.227, 0.138, 33 0.0843, 0.0514, 0.0313, 0.0191, 0.0117, 0.007, 0.138 }; 34 35 public static final double textScale[] = { 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5556, 0.3086, 0.1714, 0.0953, 36 0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 }; 38 37 39 38 private static final EnumMap<ColCOL, Color> bodyColours = new EnumMap<ColCOL, Color>(ColCOL.class); … … 86 85 87 86 public static void drawSymbol(Graphics2D g2, ArrayList<Instr> symbol, int zoom, double x, double y, Delta dd, Scheme cs) { 88 int pn = cs.pat.size(); 89 int cn = cs.col.size() - pn + 1; 87 int pn = 0; 88 int cn = 0; 89 if (cs != null) { 90 pn = cs.pat.size(); 91 cn = cs.col.size() - ((pn != 0) ? pn - 1 : 0); 92 } 90 93 AffineTransform savetr = g2.getTransform(); 91 94 g2.translate(x, y); … … 94 97 switch (item.type) { 95 98 case BBOX: 96 Rectangle bbox = (Rectangle) item.params;99 Rectangle bbox = (Rectangle) item.params; 97 100 double dx = 0.0; 98 101 double dy = 0.0; … … 100 103 switch (dd.h) { 101 104 case CC: 102 dx = bbox.x + (bbox.width /2.0);103 dy = bbox.y - (bbox.height /2.0);105 dx = bbox.x + (bbox.width / 2.0); 106 dy = bbox.y - (bbox.height / 2.0); 104 107 break; 105 108 case TL: … … 112 115 break; 113 116 case TC: 114 dx = bbox.x + (bbox.width /2.0);117 dx = bbox.x + (bbox.width / 2.0); 115 118 dy = bbox.y; 116 119 break; 117 120 case LC: 118 121 dx = bbox.x; 119 dy = bbox.y - (bbox.height /2.0);122 dy = bbox.y - (bbox.height / 2.0); 120 123 break; 121 124 case RC: 122 125 dx = bbox.x + bbox.width; 123 dy = bbox.y - (bbox.height /2.0);126 dy = bbox.y - (bbox.height / 2.0); 124 127 break; 125 128 case BL: … … 132 135 break; 133 136 case BC: 134 dx = bbox.x + (bbox.width /2.0);137 dx = bbox.x + (bbox.width / 2.0); 135 138 dy = bbox.y - bbox.height; 136 139 break; … … 150 153 } 151 154 break; 155 case P2: 156 if (cn > 0) { 157 if (cn > 1) { 158 g2.setPaint(bodyColours.get(cs.col.get(1))); 159 } else { 160 g2.setPaint(bodyColours.get(cs.col.get(0))); 161 } 162 g2.fill((Path2D.Double) patch.params); 163 } 164 break; 152 165 case H2: 153 166 if ((cn > 1) && (cs.pat.get(0) == ColPAT.PAT_HORI)) { … … 211 224 g2.fill((Path2D.Double) item.params); 212 225 break; 226 case SYMB: 227 drawSymbol(g2, (ArrayList<Instr>) item.params, zoom, 0.0, 0.0, null, null); 228 break; 213 229 } 214 230 } -
applications/editors/josm/plugins/smed2/src/symbols/Topmarks.java
r29074 r29082 13 13 import java.awt.Color; 14 14 import java.awt.Rectangle; 15 import java.awt.geom.Ellipse2D; 16 import java.awt.geom.Line2D; 15 17 import java.awt.geom.Path2D; 16 18 import java.util.ArrayList; … … 21 23 public class Topmarks { 22 24 25 public static final ArrayList<Instr> TopBoard = new ArrayList<Instr>(); 26 static { 27 TopBoard.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80))); 28 ArrayList<Instr> colours = new ArrayList<Instr>(); 29 Path2D.Double p = new Path2D.Double(); p.moveTo(-19.0,-2.0); p.lineTo(-19.0,-39.0); p.lineTo(19.0,-39.0); p.lineTo(19.0,-2.0); p.closePath(); 30 colours.add(new Instr(Prim.P1, p)); 31 TopBoard.add(new Instr(Prim.COLR, colours)); 32 TopBoard.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 33 TopBoard.add(new Instr(Prim.FILL, Color.black)); 34 p = new Path2D.Double(); p.moveTo(-19.0,-2.0); p.lineTo(-19.0,-39.0); p.lineTo(19.0,-39.0); p.lineTo(19.0,-2.0); p.closePath(); 35 TopBoard.add(new Instr(Prim.PLIN, p)); 36 } 37 38 public static final ArrayList<Instr> TopCan = new ArrayList<Instr>(); 39 static { 40 TopCan.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80))); 41 ArrayList<Instr> colours = new ArrayList<Instr>(); 42 Path2D.Double p = new Path2D.Double(); p.moveTo(-12.0,-15.0); p.lineTo(-12.0,-48.0); p.lineTo(12.0,-48.0); p.lineTo(12.0,-15.0); p.closePath(); 43 colours.add(new Instr(Prim.P1, p)); 44 TopCan.add(new Instr(Prim.COLR, colours)); 45 TopCan.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 46 TopCan.add(new Instr(Prim.FILL, Color.black)); 47 TopCan.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15))); 48 p = new Path2D.Double(); p.moveTo(-12.0,-15.0); p.lineTo(-12.0,-48.0); p.lineTo(12.0,-48.0); p.lineTo(12.0,-15.0); p.closePath(); 49 TopCan.add(new Instr(Prim.PLIN, p)); 50 } 51 23 52 public static final ArrayList<Instr> TopCone = new ArrayList<Instr>(); 24 53 static { 25 54 TopCone.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80))); 26 55 ArrayList<Instr> colours = new ArrayList<Instr>(); 27 Path2D.Double p = new Path2D.Double(); p.moveTo( 0.0,0.0); p.lineTo(0.0,-15.0); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath();56 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath(); 28 57 colours.add(new Instr(Prim.P1, p)); 29 58 TopCone.add(new Instr(Prim.COLR, colours)); 30 59 TopCone.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 31 60 TopCone.add(new Instr(Prim.FILL, Color.black)); 32 p = new Path2D.Double(); p.moveTo(0.0,0.0); p.lineTo(0.0,-15.0); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath(); 61 TopCone.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15))); 62 p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath(); 33 63 TopCone.add(new Instr(Prim.PLIN, p)); 34 64 } 35 65 66 public static final ArrayList<Instr> TopCross = new ArrayList<Instr>(); 67 static { 68 TopCross.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 69 ArrayList<Instr> colours = new ArrayList<Instr>(); 70 Path2D.Double p = new Path2D.Double(); p.moveTo(-5.0,-15.0); p.lineTo(-5.0,-32.5); p.lineTo(-22.5,-32.5); p.lineTo(-22.5,-42.5); p.lineTo(-5.0,-42.5); 71 p.lineTo(-5.0,-60.0); p.lineTo(5.0,-60.0); p.lineTo(5.0,-42.5); p.lineTo(22.5,-42.5); p.lineTo(22.5,-32.5); p.lineTo(5.0,-32.5); p.lineTo(5.0,-15.0); p.closePath(); 72 colours.add(new Instr(Prim.P1, p)); 73 TopCross.add(new Instr(Prim.COLR, colours)); 74 TopCross.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 75 TopCross.add(new Instr(Prim.FILL, Color.black)); 76 TopCross.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15))); 77 TopCross.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 78 p = new Path2D.Double(); p.moveTo(-5.0,-15.0); p.lineTo(-5.0,-32.5); p.lineTo(-22.5,-32.5); p.lineTo(-22.5,-42.5); p.lineTo(-5.0,-42.5); p.lineTo(-5.0,-60.0); 79 p.lineTo(5.0,-60.0); p.lineTo(5.0,-42.5); p.lineTo(22.5,-42.5); p.lineTo(22.5,-32.5); p.lineTo(5.0,-32.5); p.lineTo(5.0,-15.0); p.closePath(); 80 TopCross.add(new Instr(Prim.PLIN, p)); 81 } 82 83 public static final ArrayList<Instr> TopEast = new ArrayList<Instr>(); 84 static { 85 TopEast.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 86 ArrayList<Instr> colours = new ArrayList<Instr>(); 87 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-80.0); p.lineTo(-15.0,-47.0); p.lineTo(15.0,-47.0); p.closePath(); 88 colours.add(new Instr(Prim.P1, p)); 89 p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath(); 90 colours.add(new Instr(Prim.P2, p)); 91 TopEast.add(new Instr(Prim.COLR, colours)); 92 TopEast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 93 TopEast.add(new Instr(Prim.FILL, Color.black)); 94 TopEast.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10))); 95 TopEast.add(new Instr(Prim.LINE, new Line2D.Double(0,-43,0,-47))); 96 TopEast.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 97 p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath(); 98 p.moveTo(0.0,-80.0); p.lineTo(-15.0,-47.0); p.lineTo(15.0,-47.0); p.closePath(); 99 TopEast.add(new Instr(Prim.PLIN, p)); 100 } 101 102 public static final ArrayList<Instr> TopIsol = new ArrayList<Instr>(); 103 static { 104 TopIsol.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 105 ArrayList<Instr> colours = new ArrayList<Instr>(); 106 Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-55.0); p.curveTo(-13.0, -72.3, 13.0, -72.3, 13.0,-55.0); p.curveTo(13.0, -37.7, -13.0, -37.7, -13.0,-55.0); p.closePath(); 107 colours.add(new Instr(Prim.P1, p)); 108 p = new Path2D.Double(); p.moveTo(-13.0,-28.0); p.curveTo(-13.0, -45.3, 13.0, -45.3, 13.0,-28.0); p.curveTo(13.0, -10.7, -13.0, -10.7, -13.0,-28.0); p.closePath(); 109 colours.add(new Instr(Prim.P2, p)); 110 TopIsol.add(new Instr(Prim.COLR, colours)); 111 TopIsol.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 112 TopIsol.add(new Instr(Prim.FILL, Color.black)); 113 TopIsol.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15))); 114 TopIsol.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 115 TopIsol.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-13,-41,26,26))); 116 TopIsol.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-13,-68,26,26))); 117 } 118 119 public static final ArrayList<Instr> TopMooring = new ArrayList<Instr>(); 120 static { 121 TopMooring.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 122 TopMooring.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 123 TopMooring.add(new Instr(Prim.FILL, Color.black)); 124 TopMooring.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-1.5,-6,3,3))); 125 TopMooring.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-8.5,-25,17,17))); 126 } 127 128 public static final ArrayList<Instr> TopNorth = new ArrayList<Instr>(); 129 static { 130 TopNorth.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 131 ArrayList<Instr> colours = new ArrayList<Instr>(); 132 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-78.0); p.lineTo(-15.0,-45.0); p.lineTo(15.0,-45.0); p.closePath(); 133 colours.add(new Instr(Prim.P1, p)); 134 p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath(); 135 colours.add(new Instr(Prim.P2, p)); 136 TopNorth.add(new Instr(Prim.COLR, colours)); 137 TopNorth.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 138 TopNorth.add(new Instr(Prim.FILL, Color.black)); 139 TopNorth.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10))); 140 TopNorth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 141 p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath(); 142 p.moveTo(0.0,-78.0); p.lineTo(-15.0,-45.0); p.lineTo(15.0,-45.0); p.closePath(); 143 TopNorth.add(new Instr(Prim.PLIN, p)); 144 } 145 146 public static final ArrayList<Instr> TopSouth = new ArrayList<Instr>(); 147 static { 148 TopSouth.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 149 ArrayList<Instr> colours = new ArrayList<Instr>(); 150 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath(); 151 colours.add(new Instr(Prim.P1, p)); 152 p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath(); 153 colours.add(new Instr(Prim.P2, p)); 154 TopSouth.add(new Instr(Prim.COLR, colours)); 155 TopSouth.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 156 TopSouth.add(new Instr(Prim.FILL, Color.black)); 157 TopSouth.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10))); 158 TopSouth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 159 p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath(); 160 p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath(); 161 TopSouth.add(new Instr(Prim.PLIN, p)); 162 } 163 164 public static final ArrayList<Instr> TopSphere = new ArrayList<Instr>(); 165 static { 166 TopSphere.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 167 ArrayList<Instr> colours = new ArrayList<Instr>(); 168 Path2D.Double p = new Path2D.Double(); p.moveTo(-14.0,-28.0); p.curveTo(-14.0,-46.7,14.0,-46.7,14.0,-28.0); p.curveTo(14.0,-9.3,-14.0,-9.3,-14.0,-28.0); p.closePath(); 169 colours.add(new Instr(Prim.P1, p)); 170 TopSphere.add(new Instr(Prim.COLR, colours)); 171 TopSphere.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 172 TopSphere.add(new Instr(Prim.FILL, Color.black)); 173 TopSphere.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-15))); 174 TopSphere.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 175 TopSphere.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-14,-42,28,28))); 176 } 177 178 public static final ArrayList<Instr> TopSquare = new ArrayList<Instr>(); 179 static { 180 TopSquare.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80))); 181 ArrayList<Instr> colours = new ArrayList<Instr>(); 182 Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-1.0); p.lineTo(-13.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath(); 183 colours.add(new Instr(Prim.P1, p)); 184 TopSquare.add(new Instr(Prim.COLR, colours)); 185 TopSquare.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 186 TopSquare.add(new Instr(Prim.FILL, Color.black)); 187 p = new Path2D.Double(); p.moveTo(-13.0,-1.0); p.lineTo(-13.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath(); 188 TopSquare.add(new Instr(Prim.PLIN, p)); 189 } 190 191 public static final ArrayList<Instr> TopTriangle = new ArrayList<Instr>(); 192 static { 193 TopTriangle.add(new Instr(Prim.BBOX, new Rectangle(-20,80,40,80))); 194 ArrayList<Instr> colours = new ArrayList<Instr>(); 195 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath(); 196 colours.add(new Instr(Prim.P1, p)); 197 TopTriangle.add(new Instr(Prim.COLR, colours)); 198 TopTriangle.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 199 TopTriangle.add(new Instr(Prim.FILL, Color.black)); 200 p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath(); 201 TopTriangle.add(new Instr(Prim.PLIN, p)); 202 } 203 204 public static final ArrayList<Instr> TopWest = new ArrayList<Instr>(); 205 static { 206 TopWest.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 207 ArrayList<Instr> colours = new ArrayList<Instr>(); 208 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath(); 209 colours.add(new Instr(Prim.P1, p)); 210 p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath(); 211 colours.add(new Instr(Prim.P2, p)); 212 TopWest.add(new Instr(Prim.COLR, colours)); 213 TopWest.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 214 TopWest.add(new Instr(Prim.FILL, Color.black)); 215 TopWest.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-10))); 216 TopWest.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 217 p = new Path2D.Double(); p.moveTo(-15.0,-10.0); p.lineTo(0.0,-43.0); p.lineTo(15.0,-10.0); p.closePath(); 218 p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath(); 219 TopWest.add(new Instr(Prim.PLIN, p)); 220 } 221 222 public static final ArrayList<Instr> TopX = new ArrayList<Instr>(); 223 static { 224 TopX.add(new Instr(Prim.BBOX, new Rectangle(-30,80,60,80))); 225 ArrayList<Instr> colours = new ArrayList<Instr>(); 226 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-27.7); p.lineTo(-12.4,-15.7); p.lineTo(-19.3,-22.6); p.lineTo(-7.3,-35.0); p.lineTo(-19.3,-47.3); 227 p.lineTo(-12.4,-54.2); p.lineTo(0.0,-42.4); p.lineTo(12.4,-54.2); p.lineTo(19.3,-47.3); p.lineTo(7.3,-35.0); p.lineTo(19.3,-22.6); p.lineTo(12.4,-15.7); p.closePath(); 228 colours.add(new Instr(Prim.P1, p)); 229 TopX.add(new Instr(Prim.COLR, colours)); 230 TopX.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 231 TopX.add(new Instr(Prim.FILL, Color.black)); 232 TopX.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-27))); 233 TopX.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 234 p = new Path2D.Double(); p.moveTo(0.0,-27.7); p.lineTo(-12.4,-15.7); p.lineTo(-19.3,-22.6); p.lineTo(-7.3,-35.0); p.lineTo(-19.3,-47.3); p.lineTo(-12.4,-54.2); p.lineTo(0.0,-42.4); 235 p.lineTo(12.4,-54.2); p.lineTo(19.3,-47.3); p.lineTo(7.3,-35.0); p.lineTo(19.3,-22.6); p.lineTo(12.4,-15.7); p.closePath(); 236 TopX.add(new Instr(Prim.PLIN, p)); 237 } 36 238 }
Note:
See TracChangeset
for help on using the changeset viewer.