Changeset 30028 in osm for applications/editors/josm/plugins/smed2/src/seamap/Rules.java
- Timestamp:
- 2013-10-20T16:50:35+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30027 r30028 31 31 static SeaMap map; 32 32 static int zoom; 33 34 public static final Color Yland = new Color(0x50b0ff); 35 public static final Color Mline = new Color(0xc480ff); 36 public static final Color Msymb = new Color(0xa30075); 33 37 34 38 public static void rules (SeaMap m, int z) { … … 121 125 if (feature.area > 2.0) { 122 126 if (zoom < 16) 123 Renderer.lineVector(feature, new LineStyle( new Color(0xc480ff), 8, new float[] { 50, 50 }, new Color(0x40ffffff, true)));127 Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 }, new Color(0x40ffffff, true))); 124 128 else 125 Renderer.lineVector(feature, new LineStyle( new Color(0xc480ff), 8, new float[] { 50, 50 }, null));129 Renderer.lineVector(feature, new LineStyle(Mline, 8, new float[] { 50, 50 }, null)); 126 130 } else { 127 131 if (zoom >= 14) … … 276 280 277 281 private static void cables(Feature feature) { 278 if (zoom >= 1 4) {282 if ((zoom >= 16) && (feature.length < 2)) { 279 283 if (feature.type == Obj.CBLSUB) { 280 284 Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0, new Color(0x80c480)); … … 327 331 case ACHBRT: 328 332 if (zoom >= 14) { 329 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme( new Color(0xc480ff)));330 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)));333 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Mline)); 334 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 30), LabelStyle.RRCT, Mline, Color.white, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 0))); 331 335 } 332 336 double radius = (Double)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS); 333 337 if (radius != 0) { 334 338 UniHLU units = (UniHLU)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS); 335 Renderer.lineCircle (feature, new LineStyle( new Color(0xc480ff), 4, new float[] { 10, 10 }, null), radius, units);339 Renderer.lineCircle (feature, new LineStyle(Mline, 4, new float[] { 10, 10 }, null), radius, units); 336 340 } 337 341 break; … … 341 345 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Color.black)); 342 346 } else { 343 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme( new Color(0xc480ff)));344 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, new Color(0xc480ff));347 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Mline)); 348 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, Mline); 345 349 } 346 350 if ((zoom >= 15) && ((name) != null)) { 347 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)));351 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), LabelStyle.NONE, Mline, null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0))); 348 352 } 349 353 ArrayList<StsSTS> sts = (ArrayList<StsSTS>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.STATUS); 350 354 if ((zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) { 351 Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));355 Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60))); 352 356 } 353 357 } … … 357 361 switch (cat) { 358 362 case ACH_DEEP: 359 Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));363 Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 360 364 dy += 60; 361 365 break; 362 366 case ACH_TANK: 363 Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));367 Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 364 368 dy += 60; 365 369 break; 366 370 case ACH_H24P: 367 Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));371 Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, Mline, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 368 372 dy += 60; 369 373 break; 370 374 case ACH_EXPL: 371 Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme( new Color(0xc480ff)));375 Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(Mline)); 372 376 dy += 60; 373 377 break; 374 378 case ACH_QUAR: 375 Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme( new Color(0xc480ff)));379 Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(Mline)); 376 380 dy += 60; 377 381 break; 378 382 case ACH_SEAP: 379 Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme( new Color(0xc480ff)));383 Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(Mline)); 380 384 dy += 60; 381 385 break; … … 385 389 case BERTHS: 386 390 if (zoom >= 14) { 387 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, new Color(0xc480ff), Color.white, null);391 Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, Mline, Color.white, null); 388 392 } 389 393 break;
Note:
See TracChangeset
for help on using the changeset viewer.
