Changeset 29126 in osm
- Timestamp:
- 2012-12-26T19:31:12+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/symbols
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/symbols/Areas.java
r29109 r29126 10 10 package symbols; 11 11 12 import java.awt.BasicStroke; 13 import java.awt.Color; 14 import java.awt.Rectangle; 15 import java.awt.geom.*; 12 16 import java.util.ArrayList; 13 17 14 import symbols.Symbols. Instr;18 import symbols.Symbols.*; 15 19 16 20 public class Areas { 17 21 public static final ArrayList<Instr> Cable = new ArrayList<Instr>(); 22 static { 23 Cable.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 24 Cable.add(new Instr(Prim.FILL, new Color(0xc480ff))); 25 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); 26 Cable.add(new Instr(Prim.PLIN, p)); 27 } 18 28 public static final ArrayList<Instr> LaneArrow = new ArrayList<Instr>(); 29 static { 30 LaneArrow.add(new Instr(Prim.STRK, new BasicStroke(10.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 31 LaneArrow.add(new Instr(Prim.FILL, new Color(0x80c480ff, true))); 32 Path2D.Double p = new Path2D.Double(); p.moveTo(15,0); p.lineTo(15,-195); p.lineTo(40,-195); 33 p.lineTo(0,-240); p.lineTo(-40,-195); p.lineTo(-15,-195); p.lineTo(-15,0); p.closePath(); 34 LaneArrow.add(new Instr(Prim.PLIN, p)); 35 } 19 36 public static final ArrayList<Instr> LineAnchor = new ArrayList<Instr>(); 37 static { 38 LineAnchor.add(new Instr(Prim.FILL, new Color(0xc480ff))); 39 LineAnchor.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.5, 0, 0, new Delta(Handle.TC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null))); 40 } 20 41 public static final ArrayList<Instr> LinePlane = new ArrayList<Instr>(); 21 42 public static final ArrayList<Instr> MarineFarm = new ArrayList<Instr>(); -
applications/editors/josm/plugins/smed2/src/symbols/Harbours.java
r29120 r29126 12 12 import java.awt.BasicStroke; 13 13 import java.awt.Color; 14 import java.awt.Rectangle; 14 15 import java.awt.geom.Arc2D; 15 16 import java.awt.geom.Ellipse2D; … … 25 26 public static final ArrayList<Instr> Anchor = new ArrayList<Instr>(); 26 27 static { 28 Anchor.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120))); 27 29 Anchor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 28 30 Anchor.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-59,20,20))); -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r29123 r29126 119 119 double dy = 0.0; 120 120 if (dd != null) { 121 g2.transform(dd.t); 121 122 switch (dd.h) { 122 123 case CC: 123 124 dx = bbox.x + (bbox.width / 2.0); 124 dy = bbox.y -(bbox.height / 2.0);125 dy = bbox.y + (bbox.height / 2.0); 125 126 break; 126 127 case TL: … … 138 139 case LC: 139 140 dx = bbox.x; 140 dy = bbox.y -(bbox.height / 2.0);141 dy = bbox.y + (bbox.height / 2.0); 141 142 break; 142 143 case RC: 143 144 dx = bbox.x + bbox.width; 144 dy = bbox.y -(bbox.height / 2.0);145 dy = bbox.y + (bbox.height / 2.0); 145 146 break; 146 147 case BL: 147 148 dx = bbox.x; 148 dy = bbox.y -bbox.height;149 dy = bbox.y + bbox.height; 149 150 break; 150 151 case BR: 151 152 dx = bbox.x + bbox.width; 152 dy = bbox.y -bbox.height;153 dy = bbox.y + bbox.height; 153 154 break; 154 155 case BC: 155 156 dx = bbox.x + (bbox.width / 2.0); 156 dy = bbox.y -bbox.height;157 dy = bbox.y + bbox.height; 157 158 break; 158 159 } 159 g2.translate(dx, dy); 160 g2.transform(dd.t); 160 g2.translate(-dx, -dy); 161 161 } 162 162 break; -
applications/editors/josm/plugins/smed2/src/symbols/Topmarks.java
r29111 r29126 28 28 public static final ArrayList<Instr> TopBoard = new ArrayList<Instr>(); 29 29 static { 30 TopBoard.add(new Instr(Prim.BBOX, new Rectangle(-20, 80,40,80)));30 TopBoard.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 31 31 ArrayList<Instr> colours = new ArrayList<Instr>(); 32 32 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(); … … 40 40 public static final ArrayList<Instr> TopCan = new ArrayList<Instr>(); 41 41 static { 42 TopCan.add(new Instr(Prim.BBOX, new Rectangle(-20, 80,40,80)));42 TopCan.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 43 43 ArrayList<Instr> colours = new ArrayList<Instr>(); 44 44 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(); … … 53 53 public static final ArrayList<Instr> TopCone = new ArrayList<Instr>(); 54 54 static { 55 TopCone.add(new Instr(Prim.BBOX, new Rectangle(-20, 80,40,80)));55 TopCone.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 56 56 ArrayList<Instr> colours = new ArrayList<Instr>(); 57 57 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(); … … 66 66 public static final ArrayList<Instr> TopCross = new ArrayList<Instr>(); 67 67 static { 68 TopCross.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));68 TopCross.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 69 69 ArrayList<Instr> colours = new ArrayList<Instr>(); 70 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); … … 82 82 public static final ArrayList<Instr> TopEast = new ArrayList<Instr>(); 83 83 static { 84 TopEast.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));84 TopEast.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 85 85 ArrayList<Instr> colours = new ArrayList<Instr>(); 86 86 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(); … … 100 100 public static final ArrayList<Instr> TopIsol = new ArrayList<Instr>(); 101 101 static { 102 TopIsol.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));102 TopIsol.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 103 103 ArrayList<Instr> colours = new ArrayList<Instr>(); 104 104 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(); … … 116 116 public static final ArrayList<Instr> TopMooring = new ArrayList<Instr>(); 117 117 static { 118 TopMooring.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));118 TopMooring.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 119 119 TopMooring.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 120 120 TopMooring.add(new Instr(Prim.FILL, Color.black)); … … 124 124 public static final ArrayList<Instr> TopNorth = new ArrayList<Instr>(); 125 125 static { 126 TopNorth.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));126 TopNorth.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 127 127 ArrayList<Instr> colours = new ArrayList<Instr>(); 128 128 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(); … … 141 141 public static final ArrayList<Instr> TopSouth = new ArrayList<Instr>(); 142 142 static { 143 TopSouth.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));143 TopSouth.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 144 144 ArrayList<Instr> colours = new ArrayList<Instr>(); 145 145 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(); … … 158 158 public static final ArrayList<Instr> TopSphere = new ArrayList<Instr>(); 159 159 static { 160 TopSphere.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));160 TopSphere.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 161 161 ArrayList<Instr> colours = new ArrayList<Instr>(); 162 162 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(); … … 171 171 public static final ArrayList<Instr> TopSquare = new ArrayList<Instr>(); 172 172 static { 173 TopSquare.add(new Instr(Prim.BBOX, new Rectangle(-20, 80,40,80)));173 TopSquare.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 174 174 ArrayList<Instr> colours = new ArrayList<Instr>(); 175 175 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 183 public static final ArrayList<Instr> TopTriangle = new ArrayList<Instr>(); 184 184 static { 185 TopTriangle.add(new Instr(Prim.BBOX, new Rectangle(-20, 80,40,80)));185 TopTriangle.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 186 186 ArrayList<Instr> colours = new ArrayList<Instr>(); 187 187 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(); … … 195 195 public static final ArrayList<Instr> TopWest = new ArrayList<Instr>(); 196 196 static { 197 TopWest.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));197 TopWest.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 198 198 ArrayList<Instr> colours = new ArrayList<Instr>(); 199 199 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(); … … 212 212 public static final ArrayList<Instr> TopX = new ArrayList<Instr>(); 213 213 static { 214 TopX.add(new Instr(Prim.BBOX, new Rectangle(-30, 80,60,80)));214 TopX.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 215 215 ArrayList<Instr> colours = new ArrayList<Instr>(); 216 216 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);
Note:
See TracChangeset
for help on using the changeset viewer.