Changeset 32101 in osm for applications/editors/josm/plugins/seachart
- Timestamp:
- 2016-03-08T10:10:33+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/seachart/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r32090 r32101 345 345 while (git.hasComp()) { 346 346 git.nextComp(); 347 boolean newComp = true; 347 348 while (git.hasEdge()) { 348 349 git.nextEdge(); 349 350 point = context.getPoint(git.next()); 350 p.moveTo(point.getX(), point.getY()); 351 if (newComp) { 352 p.moveTo(point.getX(), point.getY()); 353 newComp = false; 354 } else { 355 p.lineTo(point.getX(), point.getY()); 356 } 351 357 while (git.hasNode()) { 352 358 Snode node = git.next(); … … 357 363 } 358 364 } 359 g2.setPaint(new TexturePaint(image, new Rectangle(0, 0, 1 + (int)( 100 * sScale), 1 + (int)(100 * sScale))));365 g2.setPaint(new TexturePaint(image, new Rectangle(0, 0, 1 + (int)(300 * sScale), 1 + (int)(300 * sScale)))); 360 366 g2.fill(p); 361 367 break; -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r32095 r32101 230 230 if (testObject(Obj.ISTZNE)) for (Feature f : objects) if (testFeature(f)) separation(); 231 231 if (testObject(Obj.SNDWAV)) for (Feature f : objects) if (testFeature(f)) areas(); 232 if (testObject(Obj.WEDKLP)) for (Feature f : objects) if (testFeature(f)) areas(); 232 233 if (testObject(Obj.OSPARE)) for (Feature f : objects) if (testFeature(f)) areas(); 233 234 if (testObject(Obj.FAIRWY)) for (Feature f : objects) if (testFeature(f)) areas(); … … 256 257 if (testObject(Obj.SMCFAC)) for (Feature f : objects) if (testFeature(f)) marinas(); 257 258 if (testObject(Obj.BRIDGE)) for (Feature f : objects) if (testFeature(f)) bridges(); 258 if (testObject(Obj.PILPNT)) for (Feature f : objects) if (testFeature(f)) lights(); 259 if (testObject(Obj.PILPNT)) for (Feature f : objects) if (testFeature(f)) points(); 260 if (testObject(Obj.TOPMAR)) for (Feature f : objects) if (testFeature(f)) points(); 261 if (testObject(Obj.DAYMAR)) for (Feature f : objects) if (testFeature(f)) points(); 262 if (testObject(Obj.FOGSIG)) for (Feature f : objects) if (testFeature(f)) points(); 259 263 if (testObject(Obj.RDOCAL)) for (Feature f : objects) if (testFeature(f)) callpoint(); 260 264 if (testObject(Obj.LITMIN)) for (Feature f : objects) if (testFeature(f)) lights(); … … 429 433 if (Renderer.zoom >= 12) Renderer.fillPattern(Areas.Sandwaves); 430 434 break; 435 case WEDKLP: 436 if (Renderer.zoom >= 12) { 437 switch ((CatWED) getAttEnum(feature.type, Att.CATWED)) { 438 case WED_KELP: 439 if (feature.geom.prim == Pflag.AREA) { 440 Renderer.fillPattern(Areas.KelpA); 441 } else { 442 Renderer.symbol(Areas.KelpS); 443 } 444 break; 445 default: 446 break; 447 } 448 } 449 break; 431 450 case SPLARE: 432 451 if (Renderer.zoom >= 12) { … … 605 624 String str = ""; 606 625 if (atts.containsKey(Att.HUNITS)) { 607 switch ((UniHLU) atts.get(Att.HUNITS).val) {626 switch ((UniHLU) getAttEnum(Obj.DISMAR, Att.HUNITS)) { 608 627 case HLU_METR: 609 628 str += "m "; … … 858 877 859 878 @SuppressWarnings("unchecked") 879 private static void points() { 880 boolean ok = false; 881 switch (feature.type) { 882 case FOGSIG: 883 if (Renderer.zoom >= 12) { 884 if (feature.objs.containsKey(Obj.LIGHTS)) 885 lights(); 886 else 887 Renderer.symbol(Harbours.Post); 888 ok = true; 889 } 890 break; 891 default: 892 if (Renderer.zoom >= 14) { 893 if (feature.objs.containsKey(Obj.LIGHTS)) 894 lights(); 895 else 896 Renderer.symbol(Harbours.Post); 897 ok = true; 898 } 899 break; 900 } 901 if (ok) { 902 if (feature.objs.containsKey(Obj.TOPMAR)) { 903 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 904 if (topmap.containsKey(Att.TOPSHP)) { 905 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), null); 906 } 907 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 908 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 909 if (topmap.containsKey(Att.TOPSHP)) { 910 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), null); 911 } 912 } 913 Signals.addSignals(); 914 } 915 } 916 917 @SuppressWarnings("unchecked") 860 918 private static void lights() { 861 919 boolean ok = false; … … 863 921 case LITMAJ: 864 922 case LNDMRK: 865 Renderer.symbol(Beacons.LightMajor); 866 ok = true; 923 if (Renderer.zoom >= 12) { 924 Renderer.symbol(Beacons.LightMajor); 925 ok = true; 926 } 867 927 break; 868 928 case LITMIN: 869 929 case LIGHTS: 930 case PILPNT: 870 931 if (Renderer.zoom >= 14) { 871 932 Renderer.symbol(Beacons.LightMinor); 872 ok = true;873 }874 break;875 case PILPNT:876 if (Renderer.zoom >= 14) {877 if (feature.objs.containsKey(Obj.LIGHTS))878 Renderer.symbol(Beacons.LightMinor);879 else880 Renderer.symbol(Harbours.Post);881 933 ok = true; 882 934 } … … 959 1011 } 960 1012 MarSYS sys = MarSYS.SYS_CEVN; 961 //BnkWTW bnk = BnkWTW.BWW_UNKN;1013 BnkWTW bnk = BnkWTW.BWW_UNKN; 962 1014 AttVal<?> att = feature.atts.get(Att.MARSYS); 963 1015 if (att != null) sys = (MarSYS)att.val; 1016 att = feature.atts.get(Att.BNKWTW); 1017 if (att != null) bnk = (BnkWTW)att.val; 964 1018 ObjTab objs = feature.objs.get(Obj.NOTMRK); 965 1019 int n = objs.size(); … … 969 1023 int i = 0; 970 1024 for (AttMap atts : objs.values()) { 971 if (atts.get(Att.MARSYS) != null) sys = (MarSYS)(atts.get(Att.MARSYS).val); 1025 if (atts.get(Att.MARSYS) != null) sys = (MarSYS)(getAttEnum(Obj.NOTMRK, Att.MARSYS)); 1026 if (atts.get(Att.BNKWTW) != null) bnk = (BnkWTW)(getAttEnum(Obj.NOTMRK, Att.BNKWTW)); 972 1027 CatNMK cat = CatNMK.NMK_UNKN; 973 if (atts.get(Att.CATNMK) != null) cat = (CatNMK)(atts.get(Att.CATNMK).val); 974 Symbol sym = Notices.getNotice(cat, sys); 1028 if (atts.get(Att.CATNMK) != null) cat = (CatNMK)(getAttEnum(Obj.NOTMRK, Att.CATNMK)); 1029 Symbol sym = Notices.getNotice(cat, sys, bnk); 1030 Scheme sch = Notices.getScheme(sys, bnk); 975 1031 Handle h = Handle.CC; 976 1032 switch (i) { … … 1000 1056 break; 1001 1057 } 1002 if (h != null) Renderer.symbol(sym, new Delta(h, AffineTransform.getTranslateInstance(dx, dy)));1058 if (h != null) Renderer.symbol(sym, sch, new Delta(h, AffineTransform.getTranslateInstance(dx, dy))); 1003 1059 i++; 1004 1060 } -
applications/editors/josm/plugins/seachart/src/s57/S57val.java
r32095 r32101 66 66 Catair.put(CatAIR.AIR_EMRG, new S57enum(8, "emergency")); 67 67 } 68 public enum CatACH { ACH_UNKN, ACH_UNRD, ACH_DEEP, ACH_TANK, ACH_EXPL, ACH_QUAR, ACH_SEAP, ACH_SMCF, ACH_SMCM, ACH_H24P, ACH_LTPD, ACH_NPSH, ACH_DRYC, ACH_RAFT }68 public enum CatACH { ACH_UNKN, ACH_UNRD, ACH_DEEP, ACH_TANK, ACH_EXPL, ACH_QUAR, ACH_SEAP, ACH_SMCF, ACH_SMCM, ACH_H24P, ACH_LTPD, ACH_NPSH, ACH_DRYC, ACH_RAFT, ACH_WAIT, ACH_REPT } 69 69 private static final EnumMap<CatACH, S57enum> Catach = new EnumMap<>(CatACH.class); static {Catach.put(CatACH.ACH_UNKN, new S57enum(0, "")); 70 70 Catach.put(CatACH.ACH_UNRD, new S57enum(1, "unrestricted")); Catach.put(CatACH.ACH_DEEP, new S57enum(2, "deep_water")); Catach.put(CatACH.ACH_TANK, new S57enum(3, "tanker")); … … 72 72 Catach.put(CatACH.ACH_SMCF, new S57enum(7, "small_craft")); Catach.put(CatACH.ACH_SMCM, new S57enum(8, "small_craft_mooring")); Catach.put(CatACH.ACH_H24P, new S57enum(9, "24_hour")); 73 73 Catach.put(CatACH.ACH_LTPD, new S57enum(10, "limited_period")); Catach.put(CatACH.ACH_NPSH, new S57enum(11, "non_pushing")); Catach.put(CatACH.ACH_DRYC, new S57enum(12, "dry_cargo")); 74 Catach.put(CatACH.ACH_RAFT, new S57enum(13, "raft")); 74 Catach.put(CatACH.ACH_RAFT, new S57enum(13, "raft")); Catach.put(CatACH.ACH_WAIT, new S57enum(14, "waiting")); Catach.put(CatACH.ACH_REPT, new S57enum(15, "reported")); 75 75 } 76 76 public enum CatBRG { BRG_UNKN, BRG_FIXD, BRG_OPEN, BRG_SWNG, BRG_LIFT, BRG_BASC, BRG_PONT, BRG_DRAW, BRG_TRNS, BRG_FOOT, BRG_VIAD, BRG_AQUA, BRG_SUSP } … … 122 122 Catcon.put(CatCON.CAT_AERL, new S57enum(1, "aerial")); Catcon.put(CatCON.CAT_BELT, new S57enum(2, "belt")); 123 123 } 124 public enum CatCRN { CRN_UNKN, CRN_NONS, CRN_CONT, CRN_SHRL, CRN_TRAV, CRN_AFRM }124 public enum CatCRN { CRN_UNKN, CRN_NONS, CRN_CONT, CRN_SHRL, CRN_TRAV, CRN_AFRM, CRN_GLTH } 125 125 private static final EnumMap<CatCRN, S57enum> Catcrn = new EnumMap<>(CatCRN.class); static { Catcrn.put(CatCRN.CRN_UNKN, new S57enum(0, "")); 126 126 Catcrn.put(CatCRN.CRN_NONS, new S57enum(1, "non-specific")); Catcrn.put(CatCRN.CRN_CONT, new S57enum(2, "container")); Catcrn.put(CatCRN.CRN_SHRL, new S57enum(3, "sheerlegs")); 127 Catcrn.put(CatCRN.CRN_TRAV, new S57enum(4, "travelling")); Catcrn.put(CatCRN.CRN_AFRM , new S57enum(5, "a-frame")); 127 Catcrn.put(CatCRN.CRN_TRAV, new S57enum(4, "travelling")); Catcrn.put(CatCRN.CRN_AFRM , new S57enum(5, "a-frame")); Catcrn.put(CatCRN.CRN_GLTH , new S57enum(6, "goliath")); 128 128 } 129 129 public enum CatDAM { DAM_UNKN, DAM_WEIR, DAM_DAM, DAM_FLDB } … … 216 216 } 217 217 public enum CatLMK { LMK_UNKN, LMK_CARN, LMK_CMTY, LMK_CHMY, LMK_DISH, LMK_FLAG, LMK_FLAR, LMK_MAST, LMK_WNDS, LMK_MNMT, LMK_CLMN, LMK_MEML, LMK_OBLK, LMK_STAT, LMK_CROS, 218 LMK_DOME, LMK_RADR, LMK_TOWR, LMK_WNDM, LMK_WNDG, LMK_SPIR, LMK_BLDR }218 LMK_DOME, LMK_RADR, LMK_TOWR, LMK_WNDM, LMK_WNDG, LMK_SPIR, LMK_BLDR, LMK_TRIM, LMK_BNDM, LMK_OBSW, LMK_TORL } 219 219 private static final EnumMap<CatLMK, S57enum> Catlmk = new EnumMap<>(CatLMK.class); static {Catlmk.put(CatLMK.LMK_UNKN, new S57enum(0, "")); 220 220 Catlmk.put(CatLMK.LMK_CARN, new S57enum(1, "cairn")); Catlmk.put(CatLMK.LMK_CMTY, new S57enum(2, "cemetery")); Catlmk.put(CatLMK.LMK_CHMY, new S57enum(3, "chimney")); … … 225 225 Catlmk.put(CatLMK.LMK_RADR, new S57enum(16, "radar_scanner")); Catlmk.put(CatLMK.LMK_TOWR, new S57enum(17, "tower")); Catlmk.put(CatLMK.LMK_WNDM, new S57enum(18, "windmill")); 226 226 Catlmk.put(CatLMK.LMK_WNDG, new S57enum(19, "windmotor")); Catlmk.put(CatLMK.LMK_SPIR, new S57enum(20, "spire")); Catlmk.put(CatLMK.LMK_BLDR, new S57enum(21, "boulder")); 227 Catlmk.put(CatLMK.LMK_TRIM, new S57enum(22, "triangulation_mark")); Catlmk.put(CatLMK.LMK_BNDM, new S57enum(23, "boundary_mark")); 228 Catlmk.put(CatLMK.LMK_OBSW, new S57enum(24, "observation_wheel")); Catlmk.put(CatLMK.LMK_TORL, new S57enum(25, "toril")); 227 229 } 228 230 public enum CatLAM { LAM_UNKN, LAM_PORT, LAM_STBD, LAM_PCST, LAM_PCPT, LAM_WWLT, LAM_WWRT, LAM_CHLT, LAM_CHRT, LAM_WWSN, LAM_CHSN, LAM_CHRB, LAM_CHLB, LAM_CRRT, LAM_CRLT, … … 268 270 Catnav.put(CatNAV.NAV_CLRG, new S57enum(1, "clearing")); Catnav.put(CatNAV.NAV_TRST, new S57enum(2, "transit")); Catnav.put(CatNAV.NAV_LDNG, new S57enum(3, "leading")); 269 271 } 270 public enum CatOBS { OBS_UNKN, OBS_STMP, OBS_WELH, OBS_DIFF, OBS_CRIB, OBS_FHVN, OBS_FLAR, OBS_FLGD, OBS_ICEB, OBS_GTKL, OBS_BOOM } 272 public enum CatOBS { OBS_UNKN, OBS_STMP, OBS_WELH, OBS_DIFF, OBS_CRIB, OBS_FHVN, OBS_FLAR, OBS_FLGD, OBS_ICEB, OBS_GTKL, OBS_BOOM, OBS_UWTB, OBS_TPLT, OBS_WEND, OBS_UWAS, 273 OBS_REEF, OBS_MNFD, OBS_PNGO, OBS_RPLT, OBS_SCII } 271 274 private static final EnumMap<CatOBS, S57enum> Catobs = new EnumMap<>(CatOBS.class); static { Catobs.put(CatOBS.OBS_UNKN, new S57enum(0, "")); 272 275 Catobs.put(CatOBS.OBS_STMP, new S57enum(1, "stump")); Catobs.put(CatOBS.OBS_WELH, new S57enum(2, "wellhead")); Catobs.put(CatOBS.OBS_DIFF, new S57enum(3, "diffuser")); 273 276 Catobs.put(CatOBS.OBS_CRIB, new S57enum(4, "crib")); Catobs.put(CatOBS.OBS_FHVN, new S57enum(5, "fish_haven")); Catobs.put(CatOBS.OBS_FLAR, new S57enum(6, "foul_area")); 274 277 Catobs.put(CatOBS.OBS_FLGD, new S57enum(7, "foul_ground")); Catobs.put(CatOBS.OBS_ICEB, new S57enum(8, "ice_boom")); Catobs.put(CatOBS.OBS_GTKL, new S57enum(9, "ground_tackle")); 275 Catobs.put(CatOBS.OBS_BOOM, new S57enum(10, "boom")); 276 } 277 public enum CatOFP { OFP_UNKN, OFP_OIL, OFP_PROD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOOR, OFP_AISL, OFP_FPSO, OFP_ACCN, OFP_NCCB } 278 Catobs.put(CatOBS.OBS_BOOM, new S57enum(10, "boom")); Catobs.put(CatOBS.OBS_UWTB, new S57enum(11, "underwater_turbine")); Catobs.put(CatOBS.OBS_TPLT, new S57enum(12, "template")); 279 Catobs.put(CatOBS.OBS_WEND, new S57enum(13, "wave_energy_device")); Catobs.put(CatOBS.OBS_UWAS, new S57enum(14, "subsurface_data")); Catobs.put(CatOBS.OBS_REEF, new S57enum(15, "artificial_reef")); 280 Catobs.put(CatOBS.OBS_MNFD, new S57enum(16, "manifold")); Catobs.put(CatOBS.OBS_PNGO, new S57enum(17, "submerged_pingo")); Catobs.put(CatOBS.OBS_RPLT, new S57enum(18, "platform_remains")); 281 Catobs.put(CatOBS.OBS_SCII, new S57enum(19, "scientific_instrument")); 282 } 283 284 public enum CatOFP { OFP_UNKN, OFP_OIL, OFP_PROD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOOR, OFP_AISL, OFP_FPSO, OFP_ACCN, OFP_NCCB, OFP_FOTK } 278 285 private static final EnumMap<CatOFP, S57enum> Catofp = new EnumMap<>(CatOFP.class); static { Catofp.put(CatOFP.OFP_UNKN, new S57enum(0, "")); 279 286 Catofp.put(CatOFP.OFP_OIL, new S57enum(1, "oil")); Catofp.put(CatOFP.OFP_PROD, new S57enum(2, "production")); Catofp.put(CatOFP.OFP_OBS, new S57enum(3, "observation")); 280 287 Catofp.put(CatOFP.OFP_ALP, new S57enum(4, "alp")); Catofp.put(CatOFP.OFP_SALM, new S57enum(5, "salm")); Catofp.put(CatOFP.OFP_MOOR, new S57enum(6, "mooring")); 281 288 Catofp.put(CatOFP.OFP_AISL, new S57enum(7, "artificial_island")); Catofp.put(CatOFP.OFP_FPSO, new S57enum(8, "fpso")); Catofp.put(CatOFP.OFP_ACCN, new S57enum(9, "accommodation")); 282 Catofp.put(CatOFP.OFP_NCCB, new S57enum(10, "nccb")); 289 Catofp.put(CatOFP.OFP_NCCB, new S57enum(10, "nccb")); Catofp.put(CatOFP.OFP_FOTK, new S57enum(11, "floating_oil_tank")); 283 290 } 284 291 public enum CatOLB { OLB_UNKN, OLB_RETN, OLB_FLTG } … … 286 293 Catolb.put(CatOLB.OLB_RETN, new S57enum(1, "retention")); Catolb.put(CatOLB.OLB_FLTG, new S57enum(2, "floating")); 287 294 } 288 public enum CatPLE { PLE_UNKN, PLE_STAK, PLE_ SNAG, PLE_POST, PLE_TRIP}295 public enum CatPLE { PLE_UNKN, PLE_STAK, PLE_POST, PLE_TRIP, PLE_PLNG, PLE_PARE, PLE_PIPE } 289 296 private static final EnumMap<CatPLE, S57enum> Catple = new EnumMap<>(CatPLE.class); static { Catple.put(CatPLE.PLE_UNKN, new S57enum(0, "")); 290 Catple.put(CatPLE.PLE_STAK, new S57enum(1, "stake")); Catple.put(CatPLE.PLE_SNAG, new S57enum(2, "snag")); Catple.put(CatPLE.PLE_POST, new S57enum(3, "post")); 291 Catple.put(CatPLE.PLE_TRIP, new S57enum(4, "tripodal")); 292 } 297 Catple.put(CatPLE.PLE_STAK, new S57enum(1, "stake")); Catple.put(CatPLE.PLE_POST, new S57enum(3, "post")); Catple.put(CatPLE.PLE_TRIP, new S57enum(4, "tripodal")); 298 Catple.put(CatPLE.PLE_PLNG, new S57enum(5, "piling")); Catple.put(CatPLE.PLE_PARE, new S57enum(6, "pile_area")); Catple.put(CatPLE.PLE_PIPE, new S57enum(7, "pipe")); 299 } 300 293 301 public enum CatPIL { PIL_UNKN, PIL_CVSL, PIL_HELI, PIL_SHOR } 294 302 private static final EnumMap<CatPIL, S57enum> Catpil = new EnumMap<>(CatPIL.class); static { Catpil.put(CatPIL.PIL_UNKN, new S57enum(0, "")); … … 345 353 } 346 354 public enum CatREA { REA_UNKN, REA_SFTY, REA_NANC, REA_NFSH, REA_NATR, REA_BRDS, REA_GRSV, REA_SEAL, REA_DEGR, REA_MILY, REA_HIST, REA_INST, 347 REA_NASF, REA_STRD, REA_MINE, REA_NDIV, REA_TBAV, REA_PROH, REA_SWIM, REA_WAIT, REA_RSCH, REA_DREG, REA_FSNC, REA_ERES, REA_NWAK, REA_SWNG, REA_WSKI, REA_ESSA, REA_PSSA } 355 REA_NASF, REA_STRD, REA_MINE, REA_NDIV, REA_TBAV, REA_PROH, REA_SWIM, REA_WAIT, REA_RSCH, REA_DREG, REA_FSNC, REA_ERES, REA_NWAK, REA_SWNG, 356 REA_WSKI, REA_ESSA, REA_PSSA, REA_DISA, REA_PSAR, REA_CRLS } 348 357 private static final EnumMap<CatREA, S57enum> Catrea = new EnumMap<>(CatREA.class); static { Catrea.put(CatREA.REA_UNKN, new S57enum(0, "")); 349 358 Catrea.put(CatREA.REA_SFTY, new S57enum(1, "safety")); Catrea.put(CatREA.REA_NANC, new S57enum(2, "no_anchoring")); Catrea.put(CatREA.REA_NFSH, new S57enum(3, "no_fishing")); … … 357 366 Catrea.put(CatREA.REA_SWNG, new S57enum(25, "swinging")); Catrea.put(CatREA.REA_WSKI, new S57enum(26, "water_skiing")); 358 367 Catrea.put(CatREA.REA_ESSA, new S57enum(27, "environmentally_sensitive")); Catrea.put(CatREA.REA_PSSA, new S57enum(28, "particularly_sensitive")); 368 Catrea.put(CatREA.REA_DISA, new S57enum(29, "disengagement")); Catrea.put(CatREA.REA_PSAR, new S57enum(30, "port_security")); Catrea.put(CatREA.REA_CRLS, new S57enum(31, "coral_sactuary")); 359 369 } 360 370 public enum CatROD { ROD_UNKN, ROD_MWAY, ROD_MAJR, ROD_MINR, ROD_TRAK, ROD_MAJS, ROD_MINS, ROD_CRSG, ROD_PATH } … … 556 566 public enum FncFNC { FNC_UNKN, FNC_HBRM, FNC_CSTM, FNC_HLTH, FNC_HOSP, FNC_POST, FNC_HOTL, FNC_RAIL, FNC_POLC, FNC_WPOL, FNC_PILO, FNC_PILL, FNC_BANK, 557 567 FNC_DIST, FNC_TRNS, FNC_FCTY, FNC_POWR, FNC_ADMIN, FNC_EDUC, FNC_CHCH, FNC_CHPL, FNC_TMPL, FNC_PGDA, FNC_SHSH, FNC_BTMP, FNC_MOSQ, FNC_MRBT, 558 FNC_LOOK, FNC_COMM, FNC_TV, FNC_RADO, FNC_RADR, FNC_LGHT, FNC_MCWV, FNC_COOL, FNC_OBS, FNC_TMBL, FNC_CLOK, FNC_CTRL, FNC_ASHM, FNC_STAD, FNC_BUSS } 568 FNC_LOOK, FNC_COMM, FNC_TV, FNC_RADO, FNC_RADR, FNC_LGHT, FNC_MCWV, FNC_COOL, FNC_OBS, FNC_TMBL, FNC_CLOK, FNC_CTRL, FNC_ASHM, FNC_STAD, FNC_BUSS, 569 FNC_PTRM, FNC_SRCT, FNC_OBSV, FNC_OREC, FNC_BTHS, FNC_PMPS } 559 570 private static final EnumMap<FncFNC, S57enum> Functn = new EnumMap<>(FncFNC.class); static {Functn.put(FncFNC.FNC_UNKN, new S57enum(0, "")); 560 571 Functn.put(FncFNC.FNC_HBRM, new S57enum(2, "harbour_master")); Functn.put(FncFNC.FNC_CSTM, new S57enum(3, "customs")); Functn.put(FncFNC.FNC_HLTH, new S57enum(4, "health")); … … 571 582 Functn.put(FncFNC.FNC_COOL, new S57enum(35, "cooling")); Functn.put(FncFNC.FNC_OBS, new S57enum(36, "observation")); Functn.put(FncFNC.FNC_TMBL, new S57enum(37, "time_ball")); 572 583 Functn.put(FncFNC.FNC_CLOK, new S57enum(38, "clock")); Functn.put(FncFNC.FNC_CTRL, new S57enum(39, "control")); Functn.put(FncFNC.FNC_ASHM, new S57enum(40, "airship_mooring")); 573 Functn.put(FncFNC.FNC_STAD, new S57enum(41, "stadium")); Functn.put(FncFNC.FNC_BUSS, new S57enum(42, "bus_station")); 574 } 584 Functn.put(FncFNC.FNC_STAD, new S57enum(41, "stadium")); Functn.put(FncFNC.FNC_BUSS, new S57enum(42, "bus_station")); Functn.put(FncFNC.FNC_PTRM, new S57enum(43, "passenger_terminal")); 585 Functn.put(FncFNC.FNC_SRCT, new S57enum(44, "sea_rescue_control")); Functn.put(FncFNC.FNC_OBSV, new S57enum(45, "observatory")); Functn.put(FncFNC.FNC_OREC, new S57enum(46, "ore_crusher")); 586 Functn.put(FncFNC.FNC_BTHS, new S57enum(47, "boathouse")); Functn.put(FncFNC.FNC_PMPS, new S57enum(48, "pumping_station")); 587 } 588 575 589 public enum UniHLU { HLU_UNKN, HLU_METR, HLU_FEET, HLU_KMTR, HLU_HMTR, HLU_SMIL, HLU_NMIL } 576 590 private static final EnumMap<UniHLU, S57enum> Hunits = new EnumMap<>(UniHLU.class); static { Hunits.put(UniHLU.HLU_UNKN, new S57enum(0, "")); … … 606 620 Marsys.put(MarSYS.SYS_BWR2, new S57enum(13, "bniwr2")); Marsys.put(MarSYS.SYS_BNWR, new S57enum(14, "bniwr")); Marsys.put(MarSYS.SYS_PPWB, new S57enum(15, "ppwbc")); 607 621 } 608 public enum NatCON { CON_UNKN, CON_MSNY, CON_CONC, CON_BDRS, CON_HSRF, CON_USRF, CON_WOOD, CON_METL, CON_GRP, CON_PNTD, CON_FMWK }622 public enum NatCON { CON_UNKN, CON_MSNY, CON_CONC, CON_BDRS, CON_HSRF, CON_USRF, CON_WOOD, CON_METL, CON_GRP, CON_PNTD, CON_FMWK, CON_LATT, CON_GLAS } 609 623 private static final EnumMap<NatCON, S57enum> Natcon = new EnumMap<>(NatCON.class); static { Natcon.put(NatCON.CON_UNKN, new S57enum(0, "")); 610 624 Natcon.put(NatCON.CON_MSNY, new S57enum(1, "masonry")); Natcon.put(NatCON.CON_CONC, new S57enum(2, "concreted")); Natcon.put(NatCON.CON_BDRS, new S57enum(3, "loose_boulders")); 611 625 Natcon.put(NatCON.CON_HSRF, new S57enum(4, "hard-surfaced")); Natcon.put(NatCON.CON_USRF, new S57enum(5, "unsurfaced")); Natcon.put(NatCON.CON_WOOD, new S57enum(6, "wooden")); 612 626 Natcon.put(NatCON.CON_METL, new S57enum(7, "metal")); Natcon.put(NatCON.CON_GRP, new S57enum(8, "grp")); Natcon.put(NatCON.CON_PNTD, new S57enum(9, "painted")); 613 Natcon.put(NatCON.CON_FMWK, new S57enum(10, "framework")); 627 Natcon.put(NatCON.CON_FMWK, new S57enum(10, "framework")); Natcon.put(NatCON.CON_LATT, new S57enum(11, "latticed")); Natcon.put(NatCON.CON_GLAS, new S57enum(12, "glass")); 614 628 } 615 629 public enum NatSUR { SUR_UNKN, SUR_MUD, SUR_CLAY, SUR_SILT, SUR_SAND, SUR_STON, SUR_GRVL, SUR_PBBL, SUR_CBBL, SUR_ROCK, SUR_LAVA, SUR_CORL, SUR_SHEL, SUR_BLDR } … … 648 662 } 649 663 public enum RstRST { RST_UNKN, RST_NANC, RST_RANC, RST_NFSH, RST_RFSH, RST_NTRL, RST_RTRL, RST_NENT, RST_RENT, RST_NDRG, RST_RDRG, RST_NDVG, RST_RDVG, RST_NWAK, RST_TBAV, RST_NCST, RST_NDSC, 650 RST_RDSC, RST_NEXD, RST_REXD, RST_NDRL, RST_RDRL, RST_NHAR, RST_NLTG, RST_NDRA, RST_NSTP, RST_NLND, RST_RSPD, RST_NOVT, RST_NCOV, RST_NPOV, RST_NBRT, RST_RBRT, RST_NMFT, RST_RMFT, RST_NTRN, RST_RFWD } 664 RST_RDSC, RST_NEXD, RST_REXD, RST_NDRL, RST_RDRL, RST_NHAR, RST_NLTG, RST_NDRA, RST_NSTP, RST_NLND, RST_RSPD, RST_NOVT, RST_NCOV, RST_NPOV, RST_NBRT, RST_RBRT, RST_NMFT, RST_RMFT, RST_NTRN, 665 RST_RFWD, RST_RFWW, RST_NSWM } 651 666 private static final EnumMap<RstRST, S57enum> Restrn = new EnumMap<>(RstRST.class); static { Restrn.put(RstRST.RST_UNKN, new S57enum(0, "")); 652 667 Restrn.put(RstRST.RST_NANC, new S57enum(1, "no_anchoring")); Restrn.put(RstRST.RST_RANC, new S57enum(2, "restricted_anchoring")); Restrn.put(RstRST.RST_NFSH, new S57enum(3, "no_fishing")); … … 663 678 Restrn.put(RstRST.RST_NBRT, new S57enum(31, "no_berthing")); Restrn.put(RstRST.RST_RBRT, new S57enum(32, "restricted_berthing")); Restrn.put(RstRST.RST_NMFT, new S57enum(33, "no_making_fast")); 664 679 Restrn.put(RstRST.RST_RMFT, new S57enum(34, "restricted_making_fast")); Restrn.put(RstRST.RST_NTRN, new S57enum(35, "no_turning")); Restrn.put(RstRST.RST_RFWD, new S57enum(36, "restricted_fairway_depth")); 680 Restrn.put(RstRST.RST_RFWW, new S57enum(37, "restricted_fairway_width")); Restrn.put(RstRST.RST_NSWM, new S57enum(38, "no_swimming")); 665 681 } 666 682 public enum SigGEN { GEN_UNKN, GEN_AUTO, GEN_WAVE, GEN_HAND, GEN_WIND } … … 688 704 public enum TecSOU { SOU_UNKN, SOU_ESND, SOU_FSSN, SOU_MLBM, SOU_DIVR, SOU_LDLN, SOU_WDRG, SOU_LASR, SOU_VACC, SOU_EMAG, SOU_PHGY, SOU_SATL, SOU_LEVL, SOU_SSSN, SOU_COMP } 689 705 private static final EnumMap<TecSOU, S57enum> Tecsou = new EnumMap<>(TecSOU.class); static { Tecsou.put(TecSOU.SOU_UNKN, new S57enum(0, "")); 690 706 Tecsou.put(TecSOU.SOU_ESND, new S57enum(1, "echo-sounder")); Tecsou.put(TecSOU.SOU_FSSN, new S57enum(2, "side-scan_sonar")); Tecsou.put(TecSOU.SOU_MLBM, new S57enum(3, "multi-beam")); 691 707 Tecsou.put(TecSOU.SOU_DIVR, new S57enum(4, "diver")); Tecsou.put(TecSOU.SOU_LDLN, new S57enum(5, "lead-line")); Tecsou.put(TecSOU.SOU_WDRG, new S57enum(6, "wire-drag")); 692 708 Tecsou.put(TecSOU.SOU_LASR, new S57enum(7, "laser")); Tecsou.put(TecSOU.SOU_VACC, new S57enum(8, "vertical_acoustic")); Tecsou.put(TecSOU.SOU_EMAG, new S57enum(9, "electromagnetic")); 693 694 709 Tecsou.put(TecSOU.SOU_PHGY, new S57enum(10, "photogrammetry")); Tecsou.put(TecSOU.SOU_SATL, new S57enum(11, "satellite")); Tecsou.put(TecSOU.SOU_LEVL, new S57enum(12, "levelling")); 710 Tecsou.put(TecSOU.SOU_SSSN, new S57enum(13, "side-scan_sonar_swept")); Tecsou.put(TecSOU.SOU_COMP, new S57enum(14, "computer")); 695 711 } 696 712 public enum TopSHP { TOP_UNKN, TOP_CONE, TOP_ICONE, TOP_SPHR, TOP_ISD, TOP_CAN, TOP_BORD, TOP_SALT, TOP_CROS, TOP_CUBE, TOP_WEST, TOP_EAST, TOP_RHOM, 697 713 TOP_NORTH, TOP_SOUTH, TOP_BESM, TOP_IBESM, TOP_FLAG, TOP_SPRH, TOP_SQUR, TOP_HRECT, TOP_VRECT, TOP_TRAP, TOP_ITRAP, TOP_TRI, TOP_ITRI, TOP_CIRC, 698 TOP_CRSS, TOP_T, TOP_TRCL, TOP_CRCL, TOP_RHCL, TOP_CLTR, TOP_OTHR } 699 private static final EnumMap<TopSHP, S57enum> Topshp = new EnumMap<>(TopSHP.class); static { Topshp.put(TopSHP.TOP_UNKN, new S57enum(0, "")); 700 Topshp.put(TopSHP.TOP_CONE, new S57enum(1, "cone, point up")); Topshp.put(TopSHP.TOP_ICONE, new S57enum(2, "cone, point down")); Topshp.put(TopSHP.TOP_SPHR, new S57enum(3, "sphere")); 701 Topshp.put(TopSHP.TOP_ISD, new S57enum(4, "2 spheres")); Topshp.put(TopSHP.TOP_CAN, new S57enum(5, "cylinder")); Topshp.put(TopSHP.TOP_BORD, new S57enum(6, "board")); 702 Topshp.put(TopSHP.TOP_SALT, new S57enum(7, "x-shape")); Topshp.put(TopSHP.TOP_CROS, new S57enum(8, "cross")); Topshp.put(TopSHP.TOP_CUBE, new S57enum(9, "cube, point up")); 703 Topshp.put(TopSHP.TOP_WEST, new S57enum(10, "2 cones point together")); Topshp.put(TopSHP.TOP_EAST, new S57enum(11, "2 cones base together")); Topshp.put(TopSHP.TOP_RHOM, new S57enum(12, "rhombus")); 704 Topshp.put(TopSHP.TOP_NORTH, new S57enum(13, "2 cones up")); Topshp.put(TopSHP.TOP_SOUTH, new S57enum(14, "2 cones down")); Topshp.put(TopSHP.TOP_BESM, new S57enum(15, "besom, point up")); 705 Topshp.put(TopSHP.TOP_IBESM, new S57enum(16, "besom, point down")); Topshp.put(TopSHP.TOP_FLAG, new S57enum(17, "flag")); Topshp.put(TopSHP.TOP_SPRH, new S57enum(18, "sphere over rhombus")); 706 Topshp.put(TopSHP.TOP_SQUR, new S57enum(19, "square")); Topshp.put(TopSHP.TOP_HRECT, new S57enum(20, "rectangle, horizontal")); Topshp.put(TopSHP.TOP_VRECT, new S57enum(21, "rectangle, vertical")); 707 Topshp.put(TopSHP.TOP_TRAP, new S57enum(22, "trapezium, up")); Topshp.put(TopSHP.TOP_ITRAP, new S57enum(23, "trapezium, down")); Topshp.put(TopSHP.TOP_TRI, new S57enum(24, "triangle, point up")); 708 Topshp.put(TopSHP.TOP_ITRI, new S57enum(25, "triangle, point down")); Topshp.put(TopSHP.TOP_CIRC, new S57enum(26, "circle")); Topshp.put(TopSHP.TOP_CRSS, new S57enum(27, "2 upright crosses")); 709 Topshp.put(TopSHP.TOP_T, new S57enum(28, "t-shape")); Topshp.put(TopSHP.TOP_TRCL, new S57enum(29, "triangle, point up over circle")); Topshp.put(TopSHP.TOP_CRCL, new S57enum(30, "upright cross over circle")); 710 Topshp.put(TopSHP.TOP_RHCL, new S57enum(31, "rhombus over circle")); Topshp.put(TopSHP.TOP_CLTR, new S57enum(32, "circle over triangle, point up")); Topshp.put(TopSHP.TOP_OTHR, new S57enum(33, "other")); 711 } 714 TOP_CRSS, TOP_T, TOP_TRCL, TOP_CRCL, TOP_RHCL, TOP_CLTR, TOP_OTHR, TOP_CYSP, TOP_COSP } 715 716 private static final EnumMap<TopSHP, S57enum> Topshp = new EnumMap<>(TopSHP.class); static { Topshp.put(TopSHP.TOP_UNKN, new S57enum(0, "")); 717 Topshp.put(TopSHP.TOP_CONE, new S57enum(1, "cone, point up")); Topshp.put(TopSHP.TOP_ICONE, new S57enum(2, "cone, point down")); Topshp.put(TopSHP.TOP_SPHR, new S57enum(3, "sphere")); 718 Topshp.put(TopSHP.TOP_ISD, new S57enum(4, "2 spheres")); Topshp.put(TopSHP.TOP_CAN, new S57enum(5, "cylinder")); Topshp.put(TopSHP.TOP_BORD, new S57enum(6, "board")); 719 Topshp.put(TopSHP.TOP_SALT, new S57enum(7, "x-shape")); Topshp.put(TopSHP.TOP_CROS, new S57enum(8, "cross")); Topshp.put(TopSHP.TOP_CUBE, new S57enum(9, "cube, point up")); 720 Topshp.put(TopSHP.TOP_WEST, new S57enum(10, "2 cones point together")); Topshp.put(TopSHP.TOP_EAST, new S57enum(11, "2 cones base together")); Topshp.put(TopSHP.TOP_RHOM, new S57enum(12, "rhombus")); 721 Topshp.put(TopSHP.TOP_NORTH, new S57enum(13, "2 cones up")); Topshp.put(TopSHP.TOP_SOUTH, new S57enum(14, "2 cones down")); Topshp.put(TopSHP.TOP_BESM, new S57enum(15, "besom, point up")); 722 Topshp.put(TopSHP.TOP_IBESM, new S57enum(16, "besom, point down")); Topshp.put(TopSHP.TOP_FLAG, new S57enum(17, "flag")); Topshp.put(TopSHP.TOP_SPRH, new S57enum(18, "sphere over rhombus")); 723 Topshp.put(TopSHP.TOP_SQUR, new S57enum(19, "square")); Topshp.put(TopSHP.TOP_HRECT, new S57enum(20, "rectangle, horizontal")); Topshp.put(TopSHP.TOP_VRECT, new S57enum(21, "rectangle, vertical")); 724 Topshp.put(TopSHP.TOP_TRAP, new S57enum(22, "trapezium, up")); Topshp.put(TopSHP.TOP_ITRAP, new S57enum(23, "trapezium, down")); Topshp.put(TopSHP.TOP_TRI, new S57enum(24, "triangle, point up")); 725 Topshp.put(TopSHP.TOP_ITRI, new S57enum(25, "triangle, point down")); Topshp.put(TopSHP.TOP_CIRC, new S57enum(26, "circle")); Topshp.put(TopSHP.TOP_CRSS, new S57enum(27, "2 upright crosses")); 726 Topshp.put(TopSHP.TOP_T, new S57enum(28, "t-shape")); Topshp.put(TopSHP.TOP_TRCL, new S57enum(29, "triangle, point up over circle")); Topshp.put(TopSHP.TOP_CRCL, new S57enum(30, "upright cross over circle")); 727 Topshp.put(TopSHP.TOP_RHCL, new S57enum(31, "rhombus over circle")); Topshp.put(TopSHP.TOP_CLTR, new S57enum(32, "circle over triangle, point up")); Topshp.put(TopSHP.TOP_OTHR, new S57enum(33, "other")); 728 Topshp.put(TopSHP.TOP_CYSP, new S57enum(34, "cylinder over sphere")); Topshp.put(TopSHP.TOP_COSP, new S57enum(35, "cone, point up over sphere")); 729 } 712 730 public enum TrfTRF { TRF_UNKN, TRF_INBD, TRF_OBND, TRF_ONEW, TRF_TWOW } 713 731 private static final EnumMap<TrfTRF, S57enum> Trafic = new EnumMap<>(TrfTRF.class); static { Trafic.put(TrfTRF.TRF_UNKN, new S57enum(0, "")); … … 765 783 Bnkwtw.put(BnkWTW.BWW_LEFT, new S57enum(1, "left")); Bnkwtw.put(BnkWTW.BWW_RGHT, new S57enum(2, "right")); 766 784 } 767 public enum CatNMK { NMK_UNKN, NMK_NENT, NMK_CLSA, NMK_NOVK, NMK_NCOV, NMK_NPAS, NMK_N CPS, NMK_NBRT, NMK_NBLL, NMK_NANK, NMK_NMOR, NMK_NTRN, NMK_NWSH,785 public enum CatNMK { NMK_UNKN, NMK_NENT, NMK_CLSA, NMK_NOVK, NMK_NCOV, NMK_NPAS, NMK_NBRT, NMK_NBLL, NMK_NANK, NMK_NMOR, NMK_NTRN, NMK_NWSH, 768 786 NMK_NPSL, NMK_NPSR, NMK_NMTC, NMK_NSPC, NMK_NWSK, NMK_NSLC, NMK_NUPC, NMK_NSLB, NMK_NWBK, NMK_NHSC, NMK_NLBG, NMK_MVTL, NMK_MVTR, NMK_MVTP, 769 787 NMK_MVTS, NMK_KPTP, NMK_KPTS, NMK_CSTP, NMK_CSTS, NMK_STOP, NMK_SPDL, NMK_SHRN, NMK_KPLO, NMK_GWJN, NMK_GWCS, NMK_MKRC, NMK_LMDP, NMK_LMHR, … … 772 790 NMK_BTU1, NMK_BTU2, NMK_BTU3, NMK_ANKP, NMK_MORP, NMK_VLBT, NMK_TRNA, NMK_SWWC, NMK_SWWR, NMK_SWWL, NMK_WRSA, NMK_WLSA, NMK_WRSL, NMK_WLSR, 773 791 NMK_WRAL, NMK_WLAR, NMK_MWWC, NMK_MWWJ, NMK_MWAR, NMK_MWAL, NMK_WARL, NMK_WALR, NMK_PEND, NMK_DWTR, NMK_TELE, NMK_MTCP, NMK_SPCP, NMK_WSKP, 774 NMK_SLCP, NMK_UPCP, NMK_SLBP, NMK_RADI, NMK_WTBP, NMK_HSCP, NMK_LBGP, NMK_KTPM, NMK_KTSM, NMK_KTMR, NMK_CRTP, NMK_CRTS, NMK_TRBM, NMK_RSPD } 792 NMK_SLCP, NMK_UPCP, NMK_SLBP, NMK_RADI, NMK_WTBP, NMK_HSCP, NMK_LBGP, NMK_KTPM, NMK_KTSM, NMK_KTMR, NMK_CRTP, NMK_CRTS, NMK_TRBM, NMK_RSPD, 793 NMK_WRKP, NMK_PSBS, NMK_NCPS, NMK_NSMC, NMK_ATTN, NMK_FWCR, NMK_SHIP } 775 794 private static final EnumMap<CatNMK, S57enum> Catnmk = new EnumMap<>(CatNMK.class); static { Catnmk.put(CatNMK.NMK_UNKN, new S57enum(0, "")); 776 795 Catnmk.put(CatNMK.NMK_NENT, new S57enum(1, "no_entry")); Catnmk.put(CatNMK.NMK_CLSA, new S57enum(2, "closed_area")); Catnmk.put(CatNMK.NMK_NOVK, new S57enum(3, "no_overtaking")); … … 814 833 Catnmk.put(CatNMK.NMK_KTPM, new S57enum(103, "keep_to_port_margin")); Catnmk.put(CatNMK.NMK_KTSM, new S57enum(104, "keep_to_starboard_margin")); Catnmk.put(CatNMK.NMK_KTMR, new S57enum(105, "keep_to_mid-river")); 815 834 Catnmk.put(CatNMK.NMK_CRTP, new S57enum(106, "cross_river_to_port")); Catnmk.put(CatNMK.NMK_CRTS, new S57enum(107, "cross_river_to_starboard")); Catnmk.put(CatNMK.NMK_TRBM, new S57enum(108, "traffic_between_margins")); 816 Catnmk.put(CatNMK.NMK_RSPD, new S57enum(109, "reduce_speed")); Catnmk.put(CatNMK.NMK_NCPS, new S57enum(199, "no_convoy_passing")); 835 Catnmk.put(CatNMK.NMK_RSPD, new S57enum(109, "reduce_speed")); Catnmk.put(CatNMK.NMK_WRKP, new S57enum(110, "wreck_pontoon")); Catnmk.put(CatNMK.NMK_PSBS, new S57enum(111, "pass_both_sides")); 836 Catnmk.put(CatNMK.NMK_NCPS, new S57enum(112, "no_convoy_passing")); Catnmk.put(CatNMK.NMK_NSMC, new S57enum(113, "no_small_craft")); Catnmk.put(CatNMK.NMK_ATTN, new S57enum(114, "attention")); 837 Catnmk.put(CatNMK.NMK_FWCR, new S57enum(115, "fairway_crossing")); Catnmk.put(CatNMK.NMK_SHIP, new S57enum(112, "shipping_inspection_point")); 817 838 } 818 839 public enum ClsDNG { DNG_UNKN, DNG_1BLU, DNG_2BLU, DNG_3BLU, DNG_0BLU, DNG_1RED } -
applications/editors/josm/plugins/seachart/src/symbols/Areas.java
r31044 r32101 53 53 LaneArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-240,40,240))); 54 54 LaneArrow.add(new Instr(Form.STRK, new BasicStroke(10, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 55 LaneArrow.add(new Instr(Form.FILL, Symbols.M line));55 LaneArrow.add(new Instr(Form.FILL, Symbols.Mtss)); 56 56 Path2D.Double p = new Path2D.Double(); p.moveTo(15,0); p.lineTo(15,-195); p.lineTo(40,-195); 57 57 p.lineTo(0,-240); p.lineTo(-40,-195); p.lineTo(-15,-195); p.lineTo(-15,0); p.closePath(); … … 204 204 g2.draw(p); 205 205 } 206 public static final Symbol KelpS = new Symbol(); 207 static { 208 KelpS.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 209 Path2D.Double p = new Path2D.Double(); p.moveTo(-60,0); p.curveTo(-20,-20,-24,40,24,20); p.moveTo(-60,0); p.quadTo(-48,20,-32,12); 210 p.moveTo(-36,-4); p.quadTo(-24,-24,-4,-16); p.quadTo(8,-32,20,-24); p.moveTo(-4,-16); p.quadTo(8,0,20,-8); 211 p.moveTo(-8,20); p.quadTo(12,0,36,8); p.quadTo(48,24,60,16); p.moveTo(36,8); p.quadTo(48,-8,60,0); 212 KelpS.add(new Instr(Form.PLIN, p)); 213 } 214 public static final BufferedImage KelpA = new BufferedImage(240, 240, BufferedImage.TYPE_INT_ARGB); 215 static { 216 Graphics2D g2 = KelpA.createGraphics(); 217 g2.setStroke(new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); 218 g2.setBackground(new Color(0, true)); 219 g2.clearRect(0, 0, 240, 240); 220 g2.setPaint(Color.black); 221 Path2D.Double p = new Path2D.Double(); 222 p.moveTo(0,60); p.curveTo(40,40,44,100,84,80); p.moveTo(0,60); p.quadTo(12,80,28,72); p.moveTo(24,56); p.quadTo(36,36,56,44); p.quadTo(68,28,80,36); 223 p.moveTo(56,44); p.quadTo(68,60,80,52); p.moveTo(52,76); p.quadTo(72,60,96,68); p.quadTo(108,84,120,76); p.moveTo(96,68); p.quadTo(108,52,120,60); 224 p.moveTo(120,180); p.curveTo(160,160,164,220,204,200); p.moveTo(120,180); p.quadTo(132,200,148,192); p.moveTo(144,176); p.quadTo(156,156,176,164); p.quadTo(188,148,200,156); 225 p.moveTo(176,164); p.quadTo(188,180,200,172); p.moveTo(172,196); p.quadTo(192,180,216,188); p.quadTo(228,204,240,196); p.moveTo(216,188); p.quadTo(228,172,240,180); 226 g2.draw(p); 227 } 206 228 } -
applications/editors/josm/plugins/seachart/src/symbols/Harbours.java
r32088 r32101 159 159 LandingSteps.add(new Instr(Form.PGON, p)); 160 160 } 161 public static final Symbol Lock_Gate = new Symbol();162 public static final Symbol Lock = new Symbol();163 161 public static final Symbol Marina = new Symbol(); 164 162 static { -
applications/editors/josm/plugins/seachart/src/symbols/Notices.java
r30894 r32101 1071 1071 }; 1072 1072 1073 private static final Symbol NoticeBB = new Symbol(); 1074 static { 1075 NoticeBB.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1076 NoticeBB.add(new Instr(Form.LINE, new Line2D.Double(-29,-29,-29,29))); 1077 NoticeBB.add(new Instr(Form.LINE, new Line2D.Double(29,-29,29,29))); 1078 NoticeBB.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1079 NoticeBB.add(new Instr(Form.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1080 } 1081 1082 private static final Symbol NoticeBP = new Symbol(); 1083 static { 1084 NoticeBP.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1085 NoticeBP.add(new Instr(Form.FILL, Color.white)); 1086 NoticeBP.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1087 NoticeBP.add(new Instr(Form.FILL, Color.black)); 1088 NoticeBP.add(new Instr(Form.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1089 } 1090 1091 private static final Symbol NoticeCR = new Symbol(); 1092 static { 1093 NoticeCR.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1094 NoticeCR.add(new Instr(Form.FILL, Color.white)); 1095 Path2D.Double p = new Path2D.Double(); p.moveTo(0, -30); p.lineTo(-30, 0); p.lineTo(0, 30); p.lineTo(30, 0); p.closePath(); 1096 NoticeCR.add(new Instr(Form.PGON, p)); 1097 NoticeCR.add(new Instr(Form.FILL, Color.black)); 1098 NoticeCR.add(new Instr(Form.PLIN, p)); 1099 } 1100 1101 private static final Symbol NoticeKT = new Symbol(); 1102 static { 1103 NoticeKT.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1104 NoticeKT.add(new Instr(Form.FILL, Color.white)); 1105 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(-30,30); p.lineTo(30,30); p.closePath(); 1106 NoticeKT.add(new Instr(Form.PGON, p)); 1107 NoticeKT.add(new Instr(Form.FILL, Color.black)); 1108 NoticeKT.add(new Instr(Form.PLIN, p)); 1109 } 1110 1073 1111 public static final Symbol NoticeBnank = new Symbol(); 1074 1112 static { 1075 1113 NoticeBnank.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1076 1114 Symbol colours = new Symbol(); 1077 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(); 1078 colours.add(new Instr(Form.P1, p)); 1079 p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath(); 1080 colours.add(new Instr(Form.P2, p)); 1115 Symbol ss = new Symbol(); 1116 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1117 colours.add(new Instr(Form.N1, ss)); 1118 ss = new Symbol(); 1119 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, null, null))); 1120 ss.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 1121 ss.add(new Instr(Form.LINE, new Line2D.Double(-27,-27,27,27))); 1122 ss.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1123 ss.add(new Instr(Form.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1124 colours.add(new Instr(Form.N2, ss)); 1081 1125 NoticeBnank.add(new Instr(Form.COLR, colours)); 1082 1126 } 1083 1127 public static final Symbol NoticeBlmhr = new Symbol(); 1128 static { 1129 NoticeBlmhr.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1130 Symbol colours = new Symbol(); 1131 Symbol ss = new Symbol(); 1132 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1133 colours.add(new Instr(Form.N1, ss)); 1134 ss = new Symbol(); 1135 ss.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 1136 Path2D.Double p = new Path2D.Double(); p.moveTo(-29,-29); p.lineTo(29,-29); p.lineTo(0,0); p.closePath(); 1137 ss.add(new Instr(Form.PGON, p)); 1138 ss.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1139 ss.add(new Instr(Form.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1140 colours.add(new Instr(Form.N2, ss)); 1141 NoticeBlmhr.add(new Instr(Form.COLR, colours)); 1142 } 1143 public static final Symbol NoticeBktpm = new Symbol(); 1144 static { 1145 NoticeBktpm.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1146 Symbol colours = new Symbol(); 1147 Symbol ss = new Symbol(); 1148 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1149 colours.add(new Instr(Form.N1, ss)); 1150 ss = new Symbol(); 1151 Path2D.Double p = new Path2D.Double(); p.moveTo(-14,-26); p.lineTo(-20,-12); p.lineTo(-8,-12); p.closePath(); 1152 ss.add(new Instr(Form.PGON, p)); 1153 ss.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1154 ss.add(new Instr(Form.LINE, new Line2D.Double(-14,-16,-14,25))); 1155 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1156 colours.add(new Instr(Form.N2, ss)); 1157 NoticeBktpm.add(new Instr(Form.COLR, colours)); 1158 } 1159 public static final Symbol NoticeBktsm = new Symbol(); 1160 static { 1161 NoticeBktsm.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1162 Symbol colours = new Symbol(); 1163 Symbol ss = new Symbol(); 1164 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1165 colours.add(new Instr(Form.N1, ss)); 1166 ss = new Symbol(); 1167 Path2D.Double p = new Path2D.Double(); p.moveTo(14,-26); p.lineTo(20,-12); p.lineTo(8,-12); p.closePath(); 1168 ss.add(new Instr(Form.PGON, p)); 1169 ss.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1170 ss.add(new Instr(Form.LINE, new Line2D.Double(14,-16,14,25))); 1171 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1172 colours.add(new Instr(Form.N2, ss)); 1173 NoticeBktsm.add(new Instr(Form.COLR, colours)); 1174 } 1175 public static final Symbol NoticeBktmr = new Symbol(); 1176 static { 1177 NoticeBktmr.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1178 Symbol colours = new Symbol(); 1179 Symbol ss = new Symbol(); 1180 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1181 colours.add(new Instr(Form.N1, ss)); 1182 ss = new Symbol(); 1183 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-26); p.lineTo(-6,-12); p.lineTo(6,-12); p.closePath(); 1184 ss.add(new Instr(Form.PGON, p)); 1185 ss.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1186 ss.add(new Instr(Form.LINE, new Line2D.Double(0,-16,0,25))); 1187 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1188 colours.add(new Instr(Form.N2, ss)); 1189 NoticeBktmr.add(new Instr(Form.COLR, colours)); 1190 } 1191 public static final Symbol NoticeBcrtp = new Symbol(); 1192 static { 1193 NoticeBcrtp.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1194 Symbol colours = new Symbol(); 1195 Symbol ss = new Symbol(); 1196 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1197 colours.add(new Instr(Form.N1, ss)); 1198 ss = new Symbol(); 1199 Path2D.Double p = new Path2D.Double(); p.moveTo(-14,-26); p.lineTo(-20,-12); p.lineTo(-8,-12); p.closePath(); 1200 ss.add(new Instr(Form.PGON, p)); 1201 ss.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1202 p = new Path2D.Double(); p.moveTo(-14,-16); p.lineTo(-14,0); p.lineTo(14,10); p.lineTo(14,25); 1203 ss.add(new Instr(Form.PLIN, p)); 1204 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1205 colours.add(new Instr(Form.N2, ss)); 1206 NoticeBcrtp.add(new Instr(Form.COLR, colours)); 1207 } 1208 public static final Symbol NoticeBcrts = new Symbol(); 1209 static { 1210 NoticeBcrts.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1211 Symbol colours = new Symbol(); 1212 Symbol ss = new Symbol(); 1213 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1214 colours.add(new Instr(Form.N1, ss)); 1215 ss = new Symbol(); 1216 Path2D.Double p = new Path2D.Double(); p.moveTo(14,-26); p.lineTo(20,-12); p.lineTo(8,-12); p.closePath(); 1217 ss.add(new Instr(Form.PGON, p)); 1218 ss.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1219 p = new Path2D.Double(); p.moveTo(14,-16); p.lineTo(14,0); p.lineTo(-14,10); p.lineTo(-14,25); 1220 ss.add(new Instr(Form.PLIN, p)); 1221 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1222 colours.add(new Instr(Form.N2, ss)); 1223 NoticeBcrts.add(new Instr(Form.COLR, colours)); 1224 } 1225 public static final Symbol NoticeBtrbm = new Symbol(); 1226 static { 1227 NoticeBtrbm.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1228 Symbol colours = new Symbol(); 1229 Symbol ss = new Symbol(); 1230 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1231 colours.add(new Instr(Form.N1, ss)); 1232 ss = new Symbol(); 1233 ss.add(new Instr(Form.STRK, new BasicStroke(15, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1234 ss.add(new Instr(Form.LINE, new Line2D.Double(0,-25,0,25))); 1235 ss.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1236 ss.add(new Instr(Form.LINE, new Line2D.Double(-20,0,20,0))); 1237 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1238 colours.add(new Instr(Form.N2, ss)); 1239 NoticeBtrbm.add(new Instr(Form.COLR, colours)); 1240 } 1241 public static final Symbol NoticeBrspd = new Symbol(); 1242 static { 1243 NoticeBrspd.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1244 Symbol colours = new Symbol(); 1245 Symbol ss = new Symbol(); 1246 ss.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1247 colours.add(new Instr(Form.N1, ss)); 1248 ss = new Symbol(); 1249 ss.add(new Instr(Form.TEXT, new Caption("R", new Font("Arial", Font.BOLD, 60), null, new Delta(Handle.CC, null)))); 1250 ss.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBB, 1.0, 0, 0, null, null))); 1251 colours.add(new Instr(Form.N2, ss)); 1252 NoticeBrspd.add(new Instr(Form.COLR, colours)); 1253 } 1254 static final Symbol NoticePBwral = new Symbol(); 1255 static { 1256 NoticePBwral.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1257 NoticePBwral.add(new Instr(Form.FILL, new Color(0xffff00))); 1258 Path2D.Double p = new Path2D.Double(); p.moveTo(-20,-25); p.lineTo(-8,-5); p.lineTo(-8,25); p.lineTo(8,25); p.lineTo(8,-5); 1259 p.lineTo(20,-25); p.lineTo(5,-25); p.lineTo(-5,-10); p.lineTo(-15,-25); p.closePath(); 1260 NoticePBwral.add(new Instr(Form.PGON, p)); 1261 } 1084 1262 public static final Symbol NoticeBwral = new Symbol(); 1085 public static final Symbol NoticeBwrar = new Symbol(); 1086 public static final Symbol NoticeBktpm = new Symbol(); 1087 public static final Symbol NoticeBktsm = new Symbol(); 1088 public static final Symbol NoticeBktmr = new Symbol(); 1089 public static final Symbol NoticeBcrtp = new Symbol(); 1090 public static final Symbol NoticeBcrts = new Symbol(); 1091 public static final Symbol NoticeBtrbm = new Symbol(); 1092 public static final Symbol NoticeBrspd = new Symbol(); 1263 static { 1264 NoticeBwral.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1265 NoticeBwral.add(new Instr(Form.FILL, Color.black)); 1266 NoticeBwral.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1267 NoticeBwral.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticePBwral, 1.0, 0, 0, null, null))); 1268 } 1269 public static final Symbol NoticeBwlar = new Symbol(); 1270 static { 1271 NoticeBwlar.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1272 NoticeBwlar.add(new Instr(Form.FILL, Color.black)); 1273 NoticeBwlar.add(new Instr(Form.RSHP, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 1274 NoticeBwlar.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticePBwral, 1.0, 0, 0, null, new Delta(Handle.CC, AffineTransform.getScaleInstance(-1, 1))))); 1275 } 1276 public static final Symbol NoticeBoptr = new Symbol(); 1277 static { 1278 NoticeBoptr.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1279 NoticeBoptr.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBP, 1.0, 0, 0, null, null))); 1280 NoticeBoptr.add(new Instr(Form.FILL, new Color(0x00a000))); 1281 NoticeBoptr.add(new Instr(Form.RSHP, new Rectangle2D.Double(-20,-20,40,40))); 1282 } 1283 public static final Symbol NoticeBoptl = new Symbol(); 1284 static { 1285 NoticeBoptl.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1286 NoticeBoptl.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBP, 1.0, 0, 0, null, null))); 1287 NoticeBoptl.add(new Instr(Form.FILL, new Color(0xf00000))); 1288 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-20); p.lineTo(-20,20); p.lineTo(20,20); p.closePath(); 1289 NoticeBoptl.add(new Instr(Form.PGON, p)); 1290 } 1093 1291 public static final EnumMap<CatNMK, Symbol> NmkBniwr = new EnumMap<CatNMK, Symbol>(CatNMK.class); 1094 1292 static { 1095 NmkBniwr.put(CatNMK.NMK_NANK, NoticeBnank); NmkBniwr.put(CatNMK.NMK_LMHR, NoticeBlmhr); NmkBniwr.put(CatNMK.NMK_OPTR, Notice D2a); NmkBniwr.put(CatNMK.NMK_OPTL, NoticeD2b);1096 NmkBniwr.put(CatNMK.NMK_WRAL, NoticeBwral); NmkBniwr.put(CatNMK.NMK_WLAR, NoticeBw rar); NmkBniwr.put(CatNMK.NMK_KTPM, NoticeBktpm); NmkBniwr.put(CatNMK.NMK_KTSM, NoticeBktsm);1293 NmkBniwr.put(CatNMK.NMK_NANK, NoticeBnank); NmkBniwr.put(CatNMK.NMK_LMHR, NoticeBlmhr); NmkBniwr.put(CatNMK.NMK_OPTR, NoticeBoptr); NmkBniwr.put(CatNMK.NMK_OPTL, NoticeBoptl); 1294 NmkBniwr.put(CatNMK.NMK_WRAL, NoticeBwral); NmkBniwr.put(CatNMK.NMK_WLAR, NoticeBwlar); NmkBniwr.put(CatNMK.NMK_KTPM, NoticeBktpm); NmkBniwr.put(CatNMK.NMK_KTSM, NoticeBktsm); 1097 1295 NmkBniwr.put(CatNMK.NMK_KTMR, NoticeBktmr); NmkBniwr.put(CatNMK.NMK_CRTP, NoticeBcrtp); NmkBniwr.put(CatNMK.NMK_CRTS, NoticeBcrts); NmkBniwr.put(CatNMK.NMK_TRBM, NoticeBtrbm); 1098 1296 NmkBniwr.put(CatNMK.NMK_RSPD, NoticeBrspd); 1099 1297 } 1298 public static final Symbol NoticePwralL = new Symbol(); 1299 static { 1300 NoticePwralL.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1301 NoticePwralL.add(new Instr(Form.FILL, Color.black)); 1302 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(-30,30); p.lineTo(30,30); p.closePath(); 1303 NoticePwralL.add(new Instr(Form.PGON, p)); 1304 NoticePwralL.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticePBwral, 1.0, 0, 0, null, new Delta(Handle.TC, AffineTransform.getScaleInstance(0.5, 0.5))))); 1305 } 1306 public static final Symbol NoticePwralR = new Symbol(); 1307 static { 1308 NoticePwralR.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1309 NoticePwralR.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBwral, 1.0, 0, 0, null, null))); 1310 } 1311 public static final Symbol NoticePwlarL = new Symbol(); 1312 static { 1313 NoticePwlarL.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1314 NoticePwlarL.add(new Instr(Form.FILL, Color.black)); 1315 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(-30,30); p.lineTo(30,30); p.closePath(); 1316 NoticePwlarL.add(new Instr(Form.PGON, p)); 1317 NoticePwlarL.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticePBwral, 1.0, 0, 0, null, new Delta(Handle.TC, AffineTransform.getScaleInstance(-0.5, 0.5))))); 1318 } 1319 public static final Symbol NoticePwlarR = new Symbol(); 1320 static { 1321 NoticePwlarR.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1322 NoticePwlarR.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBwlar, 1.0, 0, 0, null, null))); 1323 } 1324 public static final Symbol NoticePktmR = new Symbol(); 1325 static { 1326 NoticePktmR.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1327 NoticePktmR.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBP, 1.0, 0, 0, null, null))); 1328 NoticePktmR.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1329 NoticePktmR.add(new Instr(Form.FILL, new Color(0x00d400))); 1330 NoticePktmR.add(new Instr(Form.RECT, new Rectangle2D.Double(-20,-20,40,40))); 1331 } 1332 public static final Symbol NoticePktmL = new Symbol(); 1333 static { 1334 NoticePktmL.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1335 NoticePktmL.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeKT, 1.0, 0, 0, null, null))); 1336 NoticePktmL.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1337 NoticePktmL.add(new Instr(Form.FILL, new Color(0xd40000))); 1338 NoticePktmL.add(new Instr(Form.RECT, new Rectangle2D.Double(-12,2,24,24))); 1339 } 1340 public static final Symbol NoticePktmrL = new Symbol(); 1341 static { 1342 NoticePktmrL.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1343 NoticePktmrL.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeKT, 1.0, 0, 0, null, null))); 1344 NoticePktmrL.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1345 NoticePktmrL.add(new Instr(Form.FILL, new Color(0xd40000))); 1346 NoticePktmrL.add(new Instr(Form.LINE, new Line2D.Double(-12,2,-12,28))); 1347 NoticePktmrL.add(new Instr(Form.LINE, new Line2D.Double(12,2,12,28))); 1348 NoticePktmrL.add(new Instr(Form.LINE, new Line2D.Double(-12,15,12,15))); 1349 } 1350 public static final Symbol NoticePktmrR = new Symbol(); 1351 static { 1352 NoticePktmrR.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1353 NoticePktmrR.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeBP, 1.0, 0, 0, null, null))); 1354 NoticePktmrR.add(new Instr(Form.STRK, new BasicStroke(8, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1355 NoticePktmrR.add(new Instr(Form.FILL, new Color(0x00d400))); 1356 NoticePktmrR.add(new Instr(Form.LINE, new Line2D.Double(-15,-20,-15,20))); 1357 NoticePktmrR.add(new Instr(Form.LINE, new Line2D.Double(15,-20,15,20))); 1358 NoticePktmrR.add(new Instr(Form.LINE, new Line2D.Double(-15,0,15,0))); 1359 } 1360 public static final Symbol NoticePcrL = new Symbol(); 1361 static { 1362 NoticePcrL.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1363 NoticePcrL.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1364 NoticePcrL.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeCR, 1.0, 0, 0, null, null))); 1365 NoticePcrL.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1366 NoticePcrL.add(new Instr(Form.FILL, new Color(0xd40000))); 1367 NoticePcrL.add(new Instr(Form.LINE, new Line2D.Double(-12,-12,12,12))); 1368 NoticePcrL.add(new Instr(Form.LINE, new Line2D.Double(-12,12,12,-12))); 1369 } 1370 public static final Symbol NoticePcrR = new Symbol(); 1371 static { 1372 NoticePcrR.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1373 NoticePcrR.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeCR, 1.0, 0, 0, null, null))); 1374 NoticePcrR.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1375 NoticePcrR.add(new Instr(Form.FILL, new Color(0x00d400))); 1376 NoticePcrR.add(new Instr(Form.LINE, new Line2D.Double(-12,-12,12,12))); 1377 NoticePcrR.add(new Instr(Form.LINE, new Line2D.Double(-12,12,12,-12))); 1378 } 1379 static final Symbol NoticeRphib = new Symbol(); 1380 static { 1381 NoticeRphib.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1382 NoticeRphib.add(new Instr(Form.FILL, new Color(0xd40000))); 1383 NoticeRphib.add(new Instr(Form.ELPS, new Ellipse2D.Double(-30,-30,60,60))); 1384 NoticeRphib.add(new Instr(Form.LINE, new Line2D.Double(-20,-20,20,20))); 1385 } 1386 static final Symbol NoticeRinfo = new Symbol(); 1387 static { 1388 NoticeRinfo.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1389 NoticeRinfo.add(new Instr(Form.FILL, new Color(0xd40000))); 1390 NoticeRinfo.add(new Instr(Form.RECT, new Rectangle2D.Double(-30,-30,60,60))); 1391 } 1392 public static final Symbol NoticeRnpas = new Symbol(); 1393 static { 1394 NoticeRnpas.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1395 NoticeRnpas.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRphib, 1.0, 0, 0, null, null))); 1396 NoticeRnpas.add(new Instr(Form.FILL, Color.black)); 1397 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,-15); p.lineTo(-10,8); p.lineTo(-6,8); p.lineTo(-12.5,16); p.lineTo(-19,8); p.lineTo(-15,8); p.lineTo(-15,-15); 1398 p.closePath(); p.moveTo(10,15); p.lineTo(10,-8); p.lineTo(6,-8); p.lineTo(12.5,-16); p.lineTo(19,-8); p.lineTo(15,-8); p.lineTo(15,15); p.closePath(); 1399 NoticeRnpas.add(new Instr(Form.PGON, p)); 1400 } 1401 public static final Symbol NoticeRnank = new Symbol(); 1402 static { 1403 NoticeRnank.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1404 NoticeRnank.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRphib, 1.0, 0, 0, null, null))); 1405 NoticeRnank.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, new Scheme(Color.black), null))); 1406 } 1407 public static final Symbol NoticeRnwsh = new Symbol(); 1408 static { 1409 NoticeRnwsh.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1410 NoticeRnwsh.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRphib, 1.0, 0, 0, null, null))); 1411 NoticeRnwsh.add(new Instr(Form.FILL, Color.black)); 1412 Path2D.Double p = new Path2D.Double(); p.moveTo(-23,10); p.curveTo(-11,10,-12,4,0,4); p.curveTo(12,4,11,10,23,10); 1413 p.moveTo(-23,-3); p.curveTo(-11,-3,-12,-9,0,-9); p.curveTo(12,-9,11,-3,23,-3); 1414 NoticeRnwsh.add(new Instr(Form.PLIN, p)); 1415 } 1416 public static final Symbol NoticeRlmhr = new Symbol(); 1417 static { 1418 NoticeRlmhr.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1419 NoticeRlmhr.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRinfo, 1.0, 0, 0, null, null))); 1420 NoticeRlmhr.add(new Instr(Form.FILL, Color.black)); 1421 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-10); p.lineTo(27,-27); p.lineTo(-27,-27); p.closePath(); 1422 NoticeRlmhr.add(new Instr(Form.PGON, p)); 1423 } 1424 public static final Symbol NoticeRtrna = new Symbol(); 1425 static { 1426 NoticeRtrna.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1427 NoticeRtrna.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeCR, 1.0, 0, 0, null, null))); 1428 NoticeRtrna.add(new Instr(Form.STRK, new BasicStroke(5, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1429 NoticeRtrna.add(new Instr(Form.EARC, new Arc2D.Double(-15.0,-15.0,30.0,30.0,315.0,-280.0,Arc2D.OPEN))); 1430 Path2D.Double p = new Path2D.Double(); p.moveTo(18.8,-2.0); p.lineTo(15.8,-13.2); p.lineTo(7.5,-5.0); p.closePath(); 1431 NoticeRtrna.add(new Instr(Form.PGON, p)); 1432 } 1433 public static final Symbol NoticeRncps = new Symbol(); 1434 static { 1435 NoticeRncps.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1436 NoticeRncps.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRphib, 1.0, 0, 0, null, null))); 1437 NoticeRncps.add(new Instr(Form.FILL, Color.black)); 1438 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,0); p.lineTo(-10,8); p.lineTo(-6,8); p.lineTo(-12.5,16); p.lineTo(-19,8); p.lineTo(-15,8); p.lineTo(-15,0); 1439 p.closePath(); p.moveTo(10,0); p.lineTo(10,-8); p.lineTo(6,-8); p.lineTo(12.5,-16); p.lineTo(19,-8); p.lineTo(15,-8); p.lineTo(15,0); p.closePath(); 1440 NoticeRncps.add(new Instr(Form.PGON, p)); 1441 } 1442 public static final Symbol NoticeRnsmc = new Symbol(); 1443 static { 1444 NoticeRnsmc.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1445 NoticeRnsmc.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRphib, 1.0, 0, 0, null, null))); 1446 NoticeRnsmc.add(new Instr(Form.FILL, Color.black)); 1447 Path2D.Double p = new Path2D.Double(); p.moveTo(-15,5); p.lineTo(15,5); p.lineTo(25,-10); p.lineTo(12,-5); p.lineTo(-18,-1); p.closePath(); 1448 p.moveTo(-23,2); p.lineTo(-21,10); p.lineTo(-18,8); p.lineTo(-20,0); p.closePath(); 1449 NoticeRnsmc.add(new Instr(Form.PGON, p)); 1450 } 1451 public static final Symbol NoticeRattn = new Symbol(); 1452 static { 1453 NoticeRattn.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1454 NoticeRattn.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRinfo, 1.0, 0, 0, null, null))); 1455 NoticeRattn.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 1456 NoticeRattn.add(new Instr(Form.FILL, Color.black)); 1457 NoticeRattn.add(new Instr(Form.LINE, new Line2D.Double(0,-20,0,10))); 1458 NoticeRattn.add(new Instr(Form.LINE, new Line2D.Double(0,15,0,20))); 1459 } 1460 public static final Symbol NoticeRfwcr = new Symbol(); 1461 static { 1462 NoticeRfwcr.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1463 NoticeRfwcr.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeRinfo, 1.0, 0, 0, null, null))); 1464 NoticeRfwcr.add(new Instr(Form.FILL, Color.black)); 1465 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-25); p.lineTo(-8,-15); p.lineTo(-8,5); p.lineTo(-20,5); p.lineTo(-20,15); p.lineTo(-8,15); p.lineTo(-8,25); 1466 p.lineTo(8,25); p.lineTo(8,15); p.lineTo(20,15); p.lineTo(20,5); p.lineTo(8,5); p.lineTo(8,-15); p.closePath(); 1467 NoticeRfwcr.add(new Instr(Form.PGON, p)); 1468 } 1469 public static final Symbol NoticeRship = new Symbol(); 1470 static { 1471 NoticeRship.add(new Instr(Form.BBOX, new Rectangle2D.Double(-30,-30,60,60))); 1472 NoticeRship.add(new Instr(Form.SYMB, new Symbols.SubSymbol(NoticeCR, 1.0, 0, 0, null, null))); 1473 NoticeRship.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 1474 NoticeRship.add(new Instr(Form.FILL, Color.black)); 1475 NoticeRship.add(new Instr(Form.LINE, new Line2D.Double(-12,-12,10,10))); 1476 NoticeRship.add(new Instr(Form.LINE, new Line2D.Double(-12,-8,-8,-12))); 1477 NoticeRship.add(new Instr(Form.LINE, new Line2D.Double(12,-12,-10,10))); 1478 NoticeRship.add(new Instr(Form.LINE, new Line2D.Double(12,-8,8,-12))); 1479 NoticeRship.add(new Instr(Form.EARC, new Arc2D.Double(-17,-13,30,30,185,80,Arc2D.OPEN))); 1480 NoticeRship.add(new Instr(Form.EARC, new Arc2D.Double(-13,-13,30,30,275,80,Arc2D.OPEN))); 1481 } 1100 1482 1101 public static final EnumMap<CatNMK, Symbol> NmkPpwbc = new EnumMap<CatNMK, Symbol>(CatNMK.class); 1102 static { 1103 NmkPpwbc.put(CatNMK.NMK_WRAL, Notice); NmkPpwbc.put(CatNMK.NMK_WLAR, Notice); NmkPpwbc.put(CatNMK.NMK_KTPM, Notice); NmkPpwbc.put(CatNMK.NMK_KTSM, Notice); 1104 NmkPpwbc.put(CatNMK.NMK_KTMR, Notice); NmkPpwbc.put(CatNMK.NMK_CRTP, Notice); NmkPpwbc.put(CatNMK.NMK_CRTS, Notice); 1483 public static final EnumMap<CatNMK, Symbol> NmkPpwbcl = new EnumMap<CatNMK, Symbol>(CatNMK.class); 1484 static { 1485 NmkPpwbcl.put(CatNMK.NMK_WRAL, NoticePwralL); NmkPpwbcl.put(CatNMK.NMK_WLAR, NoticePwlarL); NmkPpwbcl.put(CatNMK.NMK_KTPM, NoticePktmL); NmkPpwbcl.put(CatNMK.NMK_KTSM, NoticePktmL); 1486 NmkPpwbcl.put(CatNMK.NMK_KTMR, NoticePktmrL); NmkPpwbcl.put(CatNMK.NMK_CRTP, NoticePcrL); NmkPpwbcl.put(CatNMK.NMK_CRTS, NoticePcrL); 1487 } 1488 1489 public static final EnumMap<CatNMK, Symbol> NmkPpwbcr = new EnumMap<CatNMK, Symbol>(CatNMK.class); 1490 static { 1491 NmkPpwbcr.put(CatNMK.NMK_WRAL, NoticePwralR); NmkPpwbcr.put(CatNMK.NMK_WLAR, NoticePwlarR); NmkPpwbcr.put(CatNMK.NMK_KTPM, NoticePktmR); NmkPpwbcr.put(CatNMK.NMK_KTSM, NoticePktmR); 1492 NmkPpwbcr.put(CatNMK.NMK_KTMR, NoticePktmrR); NmkPpwbcr.put(CatNMK.NMK_CRTP, NoticePcrR); NmkPpwbcr.put(CatNMK.NMK_CRTS, NoticePcrR); 1493 } 1494 1495 public static final EnumMap<CatNMK, Symbol> NmkRiwr = new EnumMap<CatNMK, Symbol>(CatNMK.class); 1496 static { 1497 NmkRiwr.put(CatNMK.NMK_NPAS, NoticeRnpas); NmkRiwr.put(CatNMK.NMK_NANK, NoticeRnank); NmkRiwr.put(CatNMK.NMK_NWSH, NoticeRnwsh); NmkRiwr.put(CatNMK.NMK_LMHR, NoticeRlmhr); NmkRiwr.put(CatNMK.NMK_TRNA, NoticeRtrna); 1498 NmkRiwr.put(CatNMK.NMK_NCPS, NoticeRncps); NmkRiwr.put(CatNMK.NMK_NSMC, NoticeRnsmc); NmkRiwr.put(CatNMK.NMK_ATTN, NoticeRattn); NmkRiwr.put(CatNMK.NMK_FWCR, NoticeRfwcr); NmkRiwr.put(CatNMK.NMK_SHIP, NoticeRship); 1105 1499 } 1106 1500 1107 1501 public static Scheme getScheme(MarSYS sys, BnkWTW bank) { 1108 1502 ArrayList<Color> colours = new ArrayList<Color>(); 1109 Scheme scheme = new Scheme( null,colours);1503 Scheme scheme = new Scheme(colours); 1110 1504 switch (sys) { 1111 1505 case SYS_BNWR: 1506 case SYS_BWR2: 1112 1507 switch (bank) { 1113 1508 case BWW_LEFT: … … 1125 1520 } 1126 1521 break; 1127 case SYS_PPWB:1128 switch (bank) {1129 case BWW_LEFT:1130 colours.add(Color.white);1131 colours.add(new Color(0xd40000));1132 break;1133 case BWW_RGHT:1134 colours.add(Color.white);1135 colours.add(new Color(0x00d400));1136 break;1137 default:1138 break;1139 }1140 break;1141 1522 default: 1142 1523 break; … … 1145 1526 } 1146 1527 1147 public static Symbol getNotice(CatNMK cat, MarSYS sys ) {1528 public static Symbol getNotice(CatNMK cat, MarSYS sys, BnkWTW bank) { 1148 1529 Symbol symbol = null; 1149 1530 switch (sys) { … … 1152 1533 break; 1153 1534 case SYS_BNWR: 1535 case SYS_BWR2: 1154 1536 symbol = NmkBniwr.get(cat); 1155 1537 break; 1156 1538 case SYS_PPWB: 1157 symbol = NmkPpwbc.get(cat); 1539 switch (bank) { 1540 case BWW_LEFT: 1541 symbol = NmkPpwbcl.get(cat); 1542 break; 1543 case BWW_RGHT: 1544 symbol = NmkPpwbcr.get(cat); 1545 break; 1546 default: 1547 break; 1548 } 1549 break; 1550 case SYS_RIWR: 1551 symbol = NmkRiwr.get(cat); 1158 1552 break; 1159 1553 default: -
applications/editors/josm/plugins/seachart/src/symbols/Symbols.java
r32090 r32101 25 25 public static final Color Mline = new Color(0x9a6078); 26 26 public static final Color Msymb = new Color(0xa30075); 27 public static final Color Mtss = new Color(0x 80c480ff, true);27 public static final Color Mtss = new Color(0xc0c480ff, true); 28 28 29 29 public enum Form { 30 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, RSHP, TEXT, SYMB, P1, P2, H2, H3, H4, H5, V2, V3, D2, D3, D4, B1, S2, S3, S4, C2, X230 BBOX, STRK, COLR, FILL, LINE, RECT, RRCT, ELPS, EARC, PLIN, PGON, RSHP, TEXT, SYMB, N1, N2, P1, P2, H2, H3, H4, H5, V2, V3, D2, D3, D4, B1, S2, S3, S4, C2, X2 31 31 } 32 32 … … 67 67 public ArrayList<Color> col; 68 68 69 public Scheme(ArrayList<Color> icol) { 70 pat = new ArrayList<Patt>(); 71 col = icol; 72 } 69 73 public Scheme(ArrayList<Patt> ipat, ArrayList<Color> icol) { 70 74 pat = ipat; … … 233 237 for (Instr patch : (Symbol) item.params) { 234 238 switch (patch.type) { 239 case N1: 240 if (cn > 0) { 241 Symbol s = (Symbol) patch.params; 242 drawSymbol(g2, s, 1.0, 0, 0, new Scheme(cs.col.get(0)), null); 243 } 244 break; 245 case N2: 246 if (cn > 0) { 247 Symbol s = (Symbol) patch.params; 248 drawSymbol(g2, s, 1.0, 0, 0, new Scheme((cn > 1) ? cs.col.get(1) : cs.col.get(0)), null); 249 } 250 break; 235 251 case P1: 236 252 if (cn > 0) { … … 288 304 if (bpat == Patt.B) { 289 305 g2.setPaint(bcol); 306 g2.fill((Path2D.Double) patch.params); 307 } 308 break; 309 case S2: 310 if ((cn > 1) && (pn > 0) && (cs.pat.get(0) == Patt.S)) { 311 g2.setPaint(cs.col.get(1)); 312 g2.fill((Path2D.Double) patch.params); 313 } 314 break; 315 case S3: 316 if ((cn > 2) && (pn > 0) && (cs.pat.get(0) == Patt.S)) { 317 g2.setPaint(cs.col.get(2)); 318 g2.fill((Path2D.Double) patch.params); 319 } 320 break; 321 case S4: 322 if ((cn == 4) && (pn > 0) && (cs.pat.get(0) == Patt.S)) { 323 g2.setPaint(cs.col.get(3)); 290 324 g2.fill((Path2D.Double) patch.params); 291 325 } -
applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java
r32090 r32101 117 117 TopEast.add(new Instr(Form.PLIN, p)); 118 118 } 119 public static final Symbol TopFlag = new Symbol(); 120 static { 121 TopFlag.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20,-80,40,80))); 122 Symbol colours = new Symbol(); 123 Path2D.Double p = new Path2D.Double(); p.moveTo(0,-40); p.lineTo(0,-10); p.lineTo(39,-10); p.lineTo(39,-40); p.closePath(); 124 colours.add(new Instr(Form.P1, p)); 125 p = new Path2D.Double(); p.moveTo(0,-25); p.lineTo(0,-10); p.lineTo(40,-10); p.lineTo(39,-25); p.closePath(); 126 colours.add(new Instr(Form.H2, p)); 127 p = new Path2D.Double(); p.moveTo(0,-30); p.lineTo(0,-20); p.lineTo(40,-20); p.lineTo(39,-30); p.closePath(); 128 colours.add(new Instr(Form.H3, p)); 129 p = new Path2D.Double(); p.moveTo(19.5,-40); p.lineTo(19.5,-10); p.lineTo(39,-10); p.lineTo(39,-40); p.closePath(); 130 colours.add(new Instr(Form.V2, p)); 131 p = new Path2D.Double(); p.moveTo(13,-40); p.lineTo(13,-10); p.lineTo(26,-10); p.lineTo(26,-40); p.closePath(); 132 colours.add(new Instr(Form.V3, p)); 133 p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD); 134 p.moveTo(0,-40); p.lineTo(0,-10); p.lineTo(39,-10); p.lineTo(39,-40); p.closePath(); 135 p.moveTo(8,-35); p.lineTo(8,-15); p.lineTo(33,-15); p.lineTo(33,-35); p.closePath(); 136 colours.add(new Instr(Form.B1, p)); 137 p = new Path2D.Double(); p.moveTo(0,-25); p.lineTo(0,-10); p.lineTo(20,-10); p.lineTo(20,-40); p.lineTo(39,-40); p.lineTo(39,-25); p.closePath(); 138 colours.add(new Instr(Form.S2, p)); 139 p = new Path2D.Double(); p.moveTo(0,-25); p.lineTo(0,-10); p.lineTo(20,-10); p.lineTo(20,-25); p.closePath(); 140 colours.add(new Instr(Form.S3, p)); 141 p = new Path2D.Double(); p.moveTo(20,-25); p.lineTo(20,-10); p.lineTo(39,-10); p.lineTo(39,-25); p.closePath(); 142 colours.add(new Instr(Form.S4, p)); 143 TopFlag.add(new Instr(Form.COLR, colours)); 144 TopFlag.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 145 TopFlag.add(new Instr(Form.FILL, Color.black)); 146 TopFlag.add(new Instr(Form.LINE, new Line2D.Double(0,0,0,-45))); 147 TopFlag.add(new Instr(Form.STRK, new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 148 TopFlag.add(new Instr(Form.RECT, new Rectangle2D.Double(0,-40,39,30))); 149 } 119 150 public static final Symbol TopIcone = new Symbol(); 120 151 static { … … 321 352 Shapes.put(TopSHP.TOP_ISD, TopIsol); Shapes.put(TopSHP.TOP_NORTH, TopNorth); Shapes.put(TopSHP.TOP_SOUTH, TopSouth); Shapes.put(TopSHP.TOP_SPHR, TopSphere); 322 353 Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle); Shapes.put(TopSHP.TOP_ITRI, TopItriangle); Shapes.put(TopSHP.TOP_WEST, TopWest); 323 Shapes.put(TopSHP.TOP_SALT, TopX); Shapes.put(TopSHP.TOP_RHOM, TopRhombus); 324 } 354 Shapes.put(TopSHP.TOP_SALT, TopX); Shapes.put(TopSHP.TOP_RHOM, TopRhombus); Shapes.put(TopSHP.TOP_FLAG, TopFlag); 355 } 356 /* 357 TOP_CUBE, TOP_SPRH, TOP_HRECT, TOP_VRECT, TOP_TRAP, TOP_ITRAP, TOP_CIRC, TOP_CRSS, TOP_T, TOP_TRCL, TOP_CRCL, TOP_RHCL, TOP_CLTR, TOP_OTHR, TOP_CYSP, TOP_COSP 358 */ 325 359 public static final EnumMap<BoySHP, Delta> BuoyDeltas = new EnumMap<BoySHP, Delta>(BoySHP.class); 326 360 static {
Note:
See TracChangeset
for help on using the changeset viewer.