Changeset 30024 in osm for applications/editors/josm
- Timestamp:
- 2013-10-14T18:04:01+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/panels/ShowFrame.java
r30014 r30024 53 53 return new Point2D.Double(150, 150); 54 54 } 55 56 public double mile(Feature feature) { 57 return 1000; 58 } 55 59 } 56 60 57 61 public ShowFrame(String title) { 58 62 super(title); -
applications/editors/josm/plugins/smed2/src/s57/S57att.java
r29995 r30024 203 203 objatt.add(new ObjAtt(Obj.WEDKLP, Att.CATWED)); objatt.add(new ObjAtt(Obj.WRECKS, Att.CATWRK)); objatt.add(new ObjAtt(Obj.TS_FEB, Att.CAT_TS)); 204 204 objatt.add(new ObjAtt(Obj.DEPCNT, Att.VALDCO)); objatt.add(new ObjAtt(Obj.SOUNDG, Att.VALSOU)); objatt.add(new ObjAtt(Obj.NOTMRK, Att.BNKWTW)); 205 objatt.add(new ObjAtt(Obj. UNKOBJ, Att.RADIUS)); objatt.add(new ObjAtt(Obj.LIGHTS, Att.LITRAD));205 objatt.add(new ObjAtt(Obj.ACHBRT, Att.RADIUS)); objatt.add(new ObjAtt(Obj.LIGHTS, Att.LITRAD)); 206 206 } 207 207 -
applications/editors/josm/plugins/smed2/src/s57/S57val.java
r30006 r30024 1107 1107 } 1108 1108 case I: 1109 return null;1109 return 0; 1110 1110 case F: 1111 return null;1111 return 0.0; 1112 1112 } 1113 1113 return null; -
applications/editors/josm/plugins/smed2/src/seamap/MapHelper.java
r29266 r30024 7 7 public interface MapHelper { 8 8 Point2D getPoint(Snode coord); 9 double mile(Feature feature); 9 10 } -
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r30023 r30024 61 61 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, 0.0843, 0.0514, 0.0313, 0.0191, 0.0117, 0.007, 0.138 }; 62 62 63 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, 0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 }; 63 // 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, 0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 }; 64 65 public enum LabelStyle { NONE, RRCT, RECT, ELPS, CIRC } 64 66 65 67 static MapHelper helper; 66 68 static SeaMap map; 67 69 static double sScale; 68 static double tScale;70 // static double tScale; 69 71 static Graphics2D g2; 70 72 static int zoom; … … 76 78 map = m; 77 79 sScale = symbolScale[zoom] * factor; 78 tScale = textScale[zoom] * factor;80 // tScale = textScale[zoom] * factor; 79 81 if (map != null) { 80 82 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); … … 139 141 } 140 142 141 private double mile(Feature feature) {142 return Math.pow(2, zoom) * 256 / (21600 * Math.abs(Math.cos(feature.centre.lat)));143 }144 145 143 public static void lineSymbols(Feature feature, Symbol prisymb, double space, Symbol secsymb, int ratio, Color col) { 146 144 Area area; … … 274 272 } 275 273 274 public static void lineCircle(Feature feature, LineStyle style, double radius, UniHLU units) { 275 switch (units) { 276 case HLU_FEET: 277 radius /= 6076; 278 break; 279 case HLU_KMTR: 280 radius /= 1.852; 281 break; 282 case HLU_HMTR: 283 radius /= 18.52; 284 break; 285 case HLU_SMIL: 286 radius /= 1.15078; 287 break; 288 case HLU_NMIL: 289 break; 290 default: 291 radius /= 1852; 292 break; 293 } 294 radius *= helper.mile(feature); 295 Symbol circle = new Symbol(); 296 if (style.fill != null) { 297 circle.add(new Instr(Prim.FILL, style.fill)); 298 circle.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-radius,-radius,radius*2,radius*2))); 299 } 300 circle.add(new Instr(Prim.FILL, style.line)); 301 circle.add(new Instr(Prim.STRK, new BasicStroke(style.width, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, style.dash, 0))); 302 circle.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-radius,-radius,radius*2,radius*2))); 303 Point2D point = helper.getPoint(feature.centre); 304 Symbols.drawSymbol(g2, circle, sScale, point.getX(), point.getY(), null, null); 305 } 306 307 276 308 public static void fillPattern(Feature feature, BufferedImage image) { 277 309 Path2D.Double p = new Path2D.Double(); … … 300 332 } 301 333 302 public static void labelText(Feature feature, String str, Font font, Color colour, Delta delta) { 334 public static void labelText(Feature feature, String str, Font font, LabelStyle style, Color fg, Color bg, Delta delta) { 335 if (delta == null) delta = new Delta(Handle.CC, null); 336 if (bg == null) bg = new Color(0x00000000, true); 337 if (str == null) str = " "; 338 if (str.isEmpty()) str = " "; 339 FontRenderContext frc = g2.getFontRenderContext(); 340 GlyphVector gv = font.deriveFont((float)(font.getSize())).createGlyphVector(frc, str.equals(" ") ? "M" : str); 341 Rectangle2D bounds = gv.getVisualBounds(); 342 double width = bounds.getWidth() * 1.5; 343 double height = bounds.getHeight() * 1.5; 344 double dx = 0; 345 double dy = 0; 346 switch (delta.h) { 347 case CC: 348 dx = width / 2.0; 349 dy = height / 2.0; 350 break; 351 case TL: 352 dx = 0; 353 dy = 0; 354 break; 355 case TR: 356 dx = width; 357 dy = 0; 358 break; 359 case TC: 360 dx = width / 2.0; 361 dy = 0; 362 break; 363 case LC: 364 dx = 0; 365 dy = height / 2.0; 366 break; 367 case RC: 368 dx = width; 369 dy = height / 2.0; 370 break; 371 case BL: 372 dx = 0; 373 dy = height; 374 break; 375 case BR: 376 dx = width; 377 dy = height; 378 break; 379 case BC: 380 dx = width / 2.0; 381 dy = height; 382 break; 383 } 303 384 Symbol label = new Symbol(); 304 label.add(new Instr(Prim.TEXT, new Caption(str, font, colour, (delta == null) ? new Delta(Handle.CC, null) : delta))); 385 switch (style) { 386 case RRCT: 387 if (width < height) width = height; 388 label.add(new Instr(Prim.FILL, bg)); 389 label.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-dx,-dy/1.25,width,height,height,height))); 390 label.add(new Instr(Prim.FILL, fg)); 391 label.add(new Instr(Prim.STRK, new BasicStroke(1 + (int)(height/10), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 392 label.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-dx,-dy/1.25,width,height,height,height))); 393 break; 394 } 395 label.add(new Instr(Prim.TEXT, new Caption(str, font, fg, delta))); 305 396 Point2D point = helper.getPoint(feature.centre); 306 397 Symbols.drawSymbol(g2, label, sScale, point.getX(), point.getY(), null, null); … … 325 416 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 326 417 FontRenderContext frc = g2.getFontRenderContext(); 327 GlyphVector gv = font.deriveFont((float)(font.getSize()* tScale)).createGlyphVector(frc, str);418 GlyphVector gv = font.deriveFont((float)(font.getSize()*sScale)).createGlyphVector(frc, str); 328 419 // double psize = Math.abs(prect.getX()); 329 420 Point2D prev = new Point2D.Double(); -
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30023 r30024 19 19 import s57.S57obj.*; 20 20 21 import seamap.Renderer.*; 21 22 import seamap.SeaMap.*; 22 23 import symbols.*; … … 111 112 Renderer.lineVector(feature, new LineStyle(Color.black, 8, new float[] { 25, 25 }, null)); 112 113 if ((zoom >= 12) && (name != null)) 113 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.PLAIN, 100), Color.black, null);114 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.PLAIN, 100), LabelStyle.NONE, Color.black, null, null); 114 115 break; 115 116 case FAIRWY: … … 135 136 Renderer.lineVector(feature, new LineStyle(Color.black, 20, new float[] { 40, 40 }, null)); 136 137 if ((zoom >= 15) && (name != null)) 137 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10)));138 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10))); 138 139 } 139 140 break; … … 202 203 } 203 204 if ((zoom >= 15) && (name != null)) 204 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90)));205 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90))); 205 206 break; 206 207 } … … 309 310 AttItem name = feature.atts.get(Att.OBJNAM); 310 311 switch (feature.type) { 312 case ACHBRT: 313 if (zoom >= 14) { 314 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff))); 315 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 30), LabelStyle.RRCT, new Color(0xc480ff), Color.white, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 0))); 316 } 317 double radius = (Double)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS); 318 if (radius != 0) { 319 UniHLU units = (UniHLU)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS); 320 Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 10, new float[] { 25, 25 }, null), radius, units); 321 } 322 break; 311 323 case ACHARE: 312 324 if (zoom >= 12) { … … 318 330 } 319 331 if ((zoom >= 15) && ((name) != null)) { 320 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), new Color(0xc480ff), new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));332 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0))); 321 333 } 322 334 ArrayList<StsSTS> sts = (ArrayList<StsSTS>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.STATUS); 323 335 if ((zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) { 324 Renderer.labelText(feature, "Reserved", new Font("Arial", Font. BOLD, 50), new Color(0xc480ff), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));336 Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60))); 325 337 } 326 338 } … … 330 342 switch (cat) { 331 343 case ACH_DEEP: 332 Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));344 Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 333 345 dy += 60; 334 346 break; 335 347 case ACH_TANK: 336 Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));348 Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 337 349 dy += 60; 338 350 break; 339 351 case ACH_H24P: 340 Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));352 Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 341 353 dy += 60; 342 354 break; … … 750 762 AttItem name = feature.atts.get(Att.OBJNAM); 751 763 if ((zoom >= 15) && (name != null)) 752 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(60, -50)));764 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(60, -50))); 753 765 /*object_rules(platforms) { 754 766 if (has_object("fog_signal")) object(fogs); … … 769 781 AttItem name = feature.atts.get(Att.OBJNAM); 770 782 if ((zoom >= 15) && (name != null)) 771 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), Color.black, null);783 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, null); 772 784 } 773 785 } … … 784 796 AttItem name = feature.atts.get(Att.OBJNAM); 785 797 if ((zoom >= 10) && (name != null)) 786 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), new Color(0x80c48080), null);798 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), LabelStyle.NONE, new Color(0x80c48080), null, null); 787 799 break; 788 800 case TSELNE: … … 883 895 break; 884 896 case ROS_VAIS: 885 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));897 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 886 898 break; 887 899 case ROS_VANC: 888 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));900 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 889 901 Renderer.symbol(feature, Topmarks.TopNorth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 890 902 break; 891 903 case ROS_VASC: 892 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));904 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 893 905 Renderer.symbol(feature, Topmarks.TopSouth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 894 906 break; 895 907 case ROS_VAEC: 896 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));908 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 897 909 Renderer.symbol(feature, Topmarks.TopEast, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 898 910 break; 899 911 case ROS_VAWC: 900 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));912 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 901 913 Renderer.symbol(feature, Topmarks.TopWest, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 902 914 break; 903 915 case ROS_VAPL: 904 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));916 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 905 917 Renderer.symbol(feature, Topmarks.TopCan, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 906 918 break; 907 919 case ROS_VASL: 908 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));920 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 909 921 Renderer.symbol(feature, Topmarks.TopCone, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 910 922 break; 911 923 case ROS_VAID: 912 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));924 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 913 925 Renderer.symbol(feature, Topmarks.TopIsol, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 914 926 break; 915 927 case ROS_VASW: 916 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));928 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 917 929 Renderer.symbol(feature, Topmarks.TopSphere, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 918 930 break; 919 931 case ROS_VASP: 920 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));932 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 921 933 Renderer.symbol(feature, Topmarks.TopX, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 922 934 break; 923 935 case ROS_VAWK: 924 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 180)));936 Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80))); 925 937 Renderer.symbol(feature, Topmarks.TopCross, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null); 926 938 break; 927 939 } 928 940 } 929 if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 70), Color.black, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -180)));941 if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -80))); 930 942 break; 931 943 case RADSTA: -
applications/editors/josm/plugins/smed2/src/smed2/MapImage.java
r29286 r30024 10 10 package smed2; 11 11 12 import java.awt.BasicStroke; 12 13 import java.awt.Color; 13 14 import java.awt.Font; … … 74 75 public void paint(Graphics2D g2, MapView mv, Bounds bb) { 75 76 Rectangle rect = Main.map.mapView.getBounds(); 76 // 77 // 77 // g2.setBackground(new Color(0xb5d0d0)); 78 // g2.clearRect(rect.x, rect.y, rect.width, rect.height); 78 79 g2.setPaint(Color.black); 79 80 g2.setFont(new Font("Arial", Font.BOLD, 20)); … … 99 100 return (Double) Main.map.mapView.getPoint2D(new LatLon(Math.toDegrees(coord.lat), Math.toDegrees(coord.lon))); 100 101 } 102 103 public double mile(Feature feature) { 104 return Math.pow(2, zoom) * 256 / (21600 * Math.abs(Math.cos(feature.centre.lat))); 105 } 101 106 } -
applications/editors/josm/plugins/smed2/src/symbols/Harbours.java
r30023 r30024 32 32 static { 33 33 Anchorage.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, null, null))); 34 }35 public static final Symbol AnchorBerth = new Symbol();36 static {37 AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchorage, 1.0, 0, 0, null, null)));38 AnchorBerth.add(new Instr(Prim.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));39 AnchorBerth.add(new Instr(Prim.FILL, Color.white));40 Ellipse2D.Double s = new Ellipse2D.Double(-25,-25,50,50);41 AnchorBerth.add(new Instr(Prim.RSHP, s));42 AnchorBerth.add(new Instr(Prim.FILL, new Color(0xa30075)));43 AnchorBerth.add(new Instr(Prim.ELPS, s));44 34 } 45 35 public static final Symbol Bollard = new Symbol();
Note:
See TracChangeset
for help on using the changeset viewer.