Changeset 29929 in osm for applications/editors/josm/plugins/smed2
- Timestamp:
- 2013-09-18T12:41:49+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/s57/S57val.java
r29787 r29929 295 295 Catpip.put(CatPIP.PIP_BBLR, new S57enum(5, "bubbler")); Catpip.put(CatPIP.PIP_SPPL, new S57enum(6, "supply")); 296 296 } 297 public enum CatPRA { PRA_UNKN, PRA_QRRY, PRA_MINE, PRA_STPL, PRA_PSTN, PRA_RFNY, PRA_TYRD, PRA_FACT, PRA_TFRM, PRA_WFRM, PRA_SLAG }297 public enum CatPRA { PRA_UNKN, PRA_QRRY, PRA_MINE, PRA_STPL, PRA_PSTN, PRA_RFNY, PRA_TYRD, PRA_FACT, PRA_TFRM, PRA_WFRM, PRA_SLAG, PRA_CURF, PRA_OILF, PRA_GASF, PRA_WAVE } 298 298 private static final EnumMap<CatPRA, S57enum> Catpra = new EnumMap<CatPRA, S57enum>(CatPRA.class); static { Catpra.put(CatPRA.PRA_UNKN, new S57enum(0, "")); 299 299 Catpra.put(CatPRA.PRA_QRRY, new S57enum(1, "quarry")); Catpra.put(CatPRA.PRA_MINE, new S57enum(2, "mine")); Catpra.put(CatPRA.PRA_STPL, new S57enum(3, "stockpile")); 300 300 Catpra.put(CatPRA.PRA_PSTN, new S57enum(4, "power_station")); Catpra.put(CatPRA.PRA_RFNY, new S57enum(5, "refinery")); Catpra.put(CatPRA.PRA_TYRD, new S57enum(6, "timber_yard")); 301 301 Catpra.put(CatPRA.PRA_FACT, new S57enum(7, "factory")); Catpra.put(CatPRA.PRA_TFRM, new S57enum(8, "tank_farm")); Catpra.put(CatPRA.PRA_WFRM, new S57enum(9, "wind_farm")); 302 Catpra.put(CatPRA.PRA_SLAG, new S57enum(10, "slag")); 302 Catpra.put(CatPRA.PRA_SLAG, new S57enum(10, "slag_heap")); Catpra.put(CatPRA.PRA_CURF, new S57enum(11, "current_farm")); Catpra.put(CatPRA.PRA_OILF, new S57enum(12, "oil")); 303 Catpra.put(CatPRA.PRA_GASF, new S57enum(13, "gas")); Catpra.put(CatPRA.PRA_WAVE, new S57enum(14, "wave_energy")); 303 304 } 304 305 public enum CatPYL { PYL_UNKN, PYL_POWR, PYL_TELE, PYL_AERL, PYL_BRDG, PYL_PIER } … … 335 336 Cattrk.put(CatTRK.TRK_FIXM, new S57enum(1, "fixed_marks")); Cattrk.put(CatTRK.TRK_NFXM, new S57enum(2, "no_fixed_marks")); 336 337 } 337 public enum CatRSC { RSC_UNKN, RSC_LIFB, RSC_ROKT, RSC_LBRK, RSC_RFSW, RSC_RFIT, RSC_LBOM, RSC_RDIO, RSC_FSTA }338 public enum CatRSC { RSC_UNKN, RSC_LIFB, RSC_ROKT, RSC_LBRK, RSC_RFSW, RSC_RFIT, RSC_LBOM, RSC_RDIO, RSC_FSTA, RSC_SPLN, RSC_ACFT, RSC_STUG } 338 339 private static final EnumMap<CatRSC, S57enum> Catrsc = new EnumMap<CatRSC, S57enum>(CatRSC.class); static { Catrsc.put(CatRSC.RSC_UNKN, new S57enum(0, "")); 339 340 Catrsc.put(CatRSC.RSC_LIFB, new S57enum(1, "lifeboat")); Catrsc.put(CatRSC.RSC_ROKT, new S57enum(2, "rocket")); Catrsc.put(CatRSC.RSC_LBRK, new S57enum(3, "lifeboat_rocket")); 340 341 Catrsc.put(CatRSC.RSC_RFSW, new S57enum(4, "refuge_shipwrecked")); Catrsc.put(CatRSC.RSC_RFIT, new S57enum(5, "refuge_intertidal")); Catrsc.put(CatRSC.RSC_LBOM, new S57enum(6, "lifeboat_on_mooring")); 341 Catrsc.put(CatRSC.RSC_RDIO, new S57enum(7, "radio")); Catrsc.put(CatRSC.RSC_FSTA, new S57enum(8, "first_aid")); 342 Catrsc.put(CatRSC.RSC_RDIO, new S57enum(7, "radio")); Catrsc.put(CatRSC.RSC_FSTA, new S57enum(8, "first_aid")); Catrsc.put(CatRSC.RSC_SPLN, new S57enum(9, "seaplane")); 343 Catrsc.put(CatRSC.RSC_ACFT, new S57enum(10, "aircraft")); Catrsc.put(CatRSC.RSC_STUG, new S57enum(12, "tug")); 342 344 } 343 345 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, … … 372 374 Catsea.put(CatSEA.SEA_GENL, new S57enum(1, "general")); Catsea.put(CatSEA.SEA_GAT, new S57enum(2, "gat")); Catsea.put(CatSEA.SEA_BANK, new S57enum(3, "bank")); 373 375 Catsea.put(CatSEA.SEA_DEEP, new S57enum(4, "deep")); Catsea.put(CatSEA.SEA_BAY, new S57enum(5, "bay")); Catsea.put(CatSEA.SEA_TRCH, new S57enum(6, "trench")); 374 Catsea.put(CatSEA.SEA_BASN, new S57enum(7, "basin")); Catsea.put(CatSEA.SEA_MDFT, new S57enum(8, " mud_flats")); Catsea.put(CatSEA.SEA_REEF, new S57enum(9, "reef"));376 Catsea.put(CatSEA.SEA_BASN, new S57enum(7, "basin")); Catsea.put(CatSEA.SEA_MDFT, new S57enum(8, "flat")); Catsea.put(CatSEA.SEA_REEF, new S57enum(9, "reef")); 375 377 Catsea.put(CatSEA.SEA_LEDG, new S57enum(10, "ledge")); Catsea.put(CatSEA.SEA_CNYN, new S57enum(11, "canyon")); Catsea.put(CatSEA.SEA_NRRW, new S57enum(12, "narrows")); 376 378 Catsea.put(CatSEA.SEA_SHOL, new S57enum(13, "shoal")); Catsea.put(CatSEA.SEA_KNOL, new S57enum(14, "knoll")); Catsea.put(CatSEA.SEA_RIDG, new S57enum(15, "ridge")); … … 382 384 Catsea.put(CatSEA.SEA_FAN, new S57enum(31, "fan")); Catsea.put(CatSEA.SEA_FZON, new S57enum(32, "fracture_zone")); Catsea.put(CatSEA.SEA_GAP, new S57enum(33, "gap")); 383 385 Catsea.put(CatSEA.SEA_GUYT, new S57enum(34, "guyot")); Catsea.put(CatSEA.SEA_HILL, new S57enum(35, "hill")); Catsea.put(CatSEA.SEA_HOLE, new S57enum(36, "hole")); 384 Catsea.put(CatSEA.SEA_LEVE, new S57enum(37, "levee")); Catsea.put(CatSEA.SEA_MVLY, new S57enum(38, "median 386 Catsea.put(CatSEA.SEA_LEVE, new S57enum(37, "levee")); Catsea.put(CatSEA.SEA_MVLY, new S57enum(38, "median_valley")); Catsea.put(CatSEA.SEA_MOAT, new S57enum(39, "moat")); 385 387 Catsea.put(CatSEA.SEA_MTNS, new S57enum(40, "mountains")); Catsea.put(CatSEA.SEA_PEAK, new S57enum(41, "peak")); Catsea.put(CatSEA.SEA_PVNC, new S57enum(42, "province")); 386 Catsea.put(CatSEA.SEA_RISE, new S57enum(43, "rise")); Catsea.put(CatSEA.SEA_SCNL, new S57enum(44, "sea 388 Catsea.put(CatSEA.SEA_RISE, new S57enum(43, "rise")); Catsea.put(CatSEA.SEA_SCNL, new S57enum(44, "sea_channel")); Catsea.put(CatSEA.SEA_SCHN, new S57enum(45, "seamount_chain")); 387 389 Catsea.put(CatSEA.SEA_SEDG, new S57enum(46, "shelf-edge")); Catsea.put(CatSEA.SEA_SILL, new S57enum(47, "sill")); Catsea.put(CatSEA.SEA_SLOP, new S57enum(48, "slope")); 388 390 Catsea.put(CatSEA.SEA_TRRC, new S57enum(49, "terrace")); Catsea.put(CatSEA.SEA_VLLY, new S57enum(50, "valley")); Catsea.put(CatSEA.SEA_CANL, new S57enum(51, "canal")); … … 390 392 } 391 393 public enum CatSLC { SLC_UNKN, SLC_BWTR, SLC_GRYN, SLC_MOLE, SLC_PIER, SLC_PPER, SLC_WHRF, SLC_TWAL, SLC_RPRP, SLC_RVMT, SLC_SWAL, SLC_LSTP, 392 SLC_RAMP, SLC_SWAY, SLC_FNDR, SLC_SFWF, SLC_OFWF, SLC_LRMP, SLC_LWAL }394 SLC_RAMP, SLC_SWAY, SLC_FNDR, SLC_SFWF, SLC_OFWF, SLC_LRMP, SLC_LWAL, SLC_ICEB } 393 395 private static final EnumMap<CatSLC, S57enum> Catslc = new EnumMap<CatSLC, S57enum>(CatSLC.class); static { Catslc.put(CatSLC.SLC_UNKN, new S57enum(0, "")); 394 396 Catslc.put(CatSLC.SLC_BWTR, new S57enum(1, "breakwater")); Catslc.put(CatSLC.SLC_GRYN, new S57enum(2, "groyne")); Catslc.put(CatSLC.SLC_MOLE, new S57enum(3, "mole")); … … 398 400 Catslc.put(CatSLC.SLC_SWAY, new S57enum(13, "slipway")); Catslc.put(CatSLC.SLC_FNDR, new S57enum(14, "fender")); Catslc.put(CatSLC.SLC_SFWF, new S57enum(15, "solid_face_wharf")); 399 401 Catslc.put(CatSLC.SLC_OFWF, new S57enum(16, "open_face_wharf")); Catslc.put(CatSLC.SLC_LRMP, new S57enum(17, "log_ramp")); Catslc.put(CatSLC.SLC_LWAL, new S57enum(18, "lock_wall")); 400 } 401 public enum CatSIT { SIT_UNKN, SIT_PRTC, SIT_PRTE, SIT_IPT, SIT_BRTH, SIT_DOCK, SIT_LOCK, SIT_FLDB, SIT_BRDG, SIT_DRDG, SIT_TCLT } 402 Catslc.put(CatSLC.SLC_ICEB, new S57enum(18, "ice_breaker")); 403 } 404 public enum CatSIT { SIT_UNKN, SIT_PRTC, SIT_PRTE, SIT_IPT, SIT_BRTH, SIT_DOCK, SIT_LOCK, SIT_FLDB, SIT_BRDG, SIT_DRDG, SIT_TCLT, SIT_SPCL, SIT_PLTG, SIT_ONCT } 402 405 private static final EnumMap<CatSIT, S57enum> Catsit = new EnumMap<CatSIT, S57enum>(CatSIT.class); static {Catsit.put(CatSIT.SIT_UNKN, new S57enum(0, "")); 403 406 Catsit.put(CatSIT.SIT_PRTC, new S57enum(1, "port_control")); Catsit.put(CatSIT.SIT_PRTE, new S57enum(2, "port_entry_departure")); Catsit.put(CatSIT.SIT_IPT, new S57enum(3, "ipt")); 404 407 Catsit.put(CatSIT.SIT_BRTH, new S57enum(4, "berthing")); Catsit.put(CatSIT.SIT_DOCK, new S57enum(5, "dock")); Catsit.put(CatSIT.SIT_LOCK, new S57enum(6, "lock")); 405 408 Catsit.put(CatSIT.SIT_FLDB, new S57enum(7, "flood_barrage")); Catsit.put(CatSIT.SIT_BRDG, new S57enum(8, "bridge_passage")); Catsit.put(CatSIT.SIT_DRDG, new S57enum(9, "dredging")); 406 Catsit.put(CatSIT.SIT_TCLT, new S57enum(10, "traffic_control_light")); 409 Catsit.put(CatSIT.SIT_TCLT, new S57enum(10, "traffic_control")); Catsit.put(CatSIT.SIT_PLTG, new S57enum(11, "pilotage")); Catsit.put(CatSIT.SIT_SPCL, new S57enum(12, "special")); 410 Catsit.put(CatSIT.SIT_ONCT, new S57enum(13, "oncoming_traffic")); 407 411 } 408 412 public enum CatSIW { SIW_UNKN, SIW_DNGR, SIW_OBST, SIW_CABL, SIW_MILY, SIW_DSTR, SIW_WTHR, SIW_STRM, SIW_ICE, SIW_TIME, SIW_TIDE, SIW_TSTR, 409 SIW_TIDG, SIW_TIDS, SIW_DIVE, SIW_WTLG, SIW_VRCL, SIW_ DPTH}413 SIW_TIDG, SIW_TIDS, SIW_DIVE, SIW_WTLG, SIW_VRCL, SIW_HIWM, SIW_DPTH, SIW_CURR } 410 414 private static final EnumMap<CatSIW, S57enum> Catsiw = new EnumMap<CatSIW, S57enum>(CatSIW.class); static {Catsiw.put(CatSIW.SIW_UNKN, new S57enum(0, "")); 411 415 Catsiw.put(CatSIW.SIW_DNGR, new S57enum(1, "danger")); Catsiw.put(CatSIW.SIW_OBST, new S57enum(2, "maritime_obstruction")); Catsiw.put(CatSIW.SIW_CABL, new S57enum(3, "cable")); … … 414 418 Catsiw.put(CatSIW.SIW_TIDE, new S57enum(10, "tide")); Catsiw.put(CatSIW.SIW_TSTR, new S57enum(11, "tidal_stream")); Catsiw.put(CatSIW.SIW_TIDG, new S57enum(12, "tide_gauge")); 415 419 Catsiw.put(CatSIW.SIW_TIDS, new S57enum(13, "tide_scale")); Catsiw.put(CatSIW.SIW_DIVE, new S57enum(14, "diving")); Catsiw.put(CatSIW.SIW_WTLG, new S57enum(15, "water_level_gauge")); 416 Catsiw.put(CatSIW.SIW_VRCL, new S57enum(16, "vertical_clearance")); Catsiw.put(CatSIW.SIW_DPTH, new S57enum(18, "depth")); 420 Catsiw.put(CatSIW.SIW_VRCL, new S57enum(16, "vertical_clearance")); Catsiw.put(CatSIW.SIW_HIWM, new S57enum(17, "high_water")); Catsiw.put(CatSIW.SIW_DPTH, new S57enum(18, "depth")); 421 Catsiw.put(CatSIW.SIW_CURR, new S57enum(19, "current")); 417 422 } 418 423 public enum CatSIL { SIL_UNKN, SIL_SILO, SIL_TANK, SIL_GRNE, SIL_WTRT } … … 491 496 private static final EnumMap<CatWED, S57enum> Catwed = new EnumMap<CatWED, S57enum>(CatWED.class); static { Catwed.put(CatWED.WED_UNKN, new S57enum(0, "")); 492 497 Catwed.put(CatWED.WED_KELP, new S57enum(1, "kelp")); Catwed.put(CatWED.WED_SWED, new S57enum(2, "sea_weed")); Catwed.put(CatWED.WED_SGRS, new S57enum(3, "sea_grass")); 493 Catwed.put(CatWED.WED_SGSO, new S57enum(4, "sar agasso"));498 Catwed.put(CatWED.WED_SGSO, new S57enum(4, "sargasso")); 494 499 } 495 500 public enum CatWRK { WRK_UNKN, WRK_NDGR, WRK_DNGR, WRK_DREM, WRK_MSTS, WRK_HULS } -
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r29826 r29929 27 27 public class Renderer { 28 28 29 public static final EnumMap<ColCOL, Color> bodyColours = new EnumMap<ColCOL, Color>(ColCOL.class); 30 static { 31 bodyColours.put(ColCOL.COL_UNK, new Color(0, true)); 32 bodyColours.put(ColCOL.COL_WHT, new Color(0xffffff)); 33 bodyColours.put(ColCOL.COL_BLK, new Color(0x000000)); 34 bodyColours.put(ColCOL.COL_RED, new Color(0xd40000)); 35 bodyColours.put(ColCOL.COL_GRN, new Color(0x00d400)); 36 bodyColours.put(ColCOL.COL_BLU, Color.blue); 37 bodyColours.put(ColCOL.COL_YEL, new Color(0xffd400)); 38 bodyColours.put(ColCOL.COL_GRY, Color.gray); 39 bodyColours.put(ColCOL.COL_BRN, new Color(0x8b4513)); 40 bodyColours.put(ColCOL.COL_AMB, new Color(0xfbf00f)); 41 bodyColours.put(ColCOL.COL_VIO, new Color(0xee82ee)); 42 bodyColours.put(ColCOL.COL_ORG, Color.orange); 43 bodyColours.put(ColCOL.COL_MAG, new Color(0xf000f0)); 44 bodyColours.put(ColCOL.COL_PNK, Color.pink); 45 } 46 47 public static final EnumMap<ColPAT, Patt> pattMap = new EnumMap<ColPAT, Patt>(ColPAT.class); 48 static { 49 pattMap.put(ColPAT.PAT_UNKN, Patt.Z); 50 pattMap.put(ColPAT.PAT_HORI, Patt.H); 51 pattMap.put(ColPAT.PAT_VERT, Patt.V); 52 pattMap.put(ColPAT.PAT_DIAG, Patt.D); 53 pattMap.put(ColPAT.PAT_BRDR, Patt.B); 54 pattMap.put(ColPAT.PAT_SQUR, Patt.S); 55 pattMap.put(ColPAT.PAT_CROS, Patt.C); 56 pattMap.put(ColPAT.PAT_SALT, Patt.X); 57 pattMap.put(ColPAT.PAT_STRP, Patt.H); 58 } 59 60 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 }; 61 62 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 29 64 static MapHelper helper; 30 65 static SeaMap map; … … 39 74 helper = h; 40 75 map = m; 41 sScale = Symbols.symbolScale[zoom] * factor;42 tScale = Symbols.textScale[zoom] * factor;76 sScale = symbolScale[zoom] * factor; 77 tScale = textScale[zoom] * factor; 43 78 if (map != null) { 44 79 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); … … 73 108 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), delta, null); 74 109 } else { 75 ArrayList<ColCOL> colours = (ArrayList<ColCOL>) getAttVal(feature, obj, 0, Att.COLOUR); 76 ArrayList<ColPAT> pattern = (ArrayList<ColPAT>) getAttVal(feature, obj, 0, Att.COLPAT); 77 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), delta, new Scheme(pattern, colours)); 110 ArrayList<Color> colours = new ArrayList<Color>(); 111 for (ColCOL col : (ArrayList<ColCOL>)getAttVal(feature, obj, 0, Att.COLOUR)) { 112 colours.add(bodyColours.get(col)); 113 } 114 ArrayList<Patt> patterns = new ArrayList<Patt>(); 115 for(ColPAT pat: (ArrayList<ColPAT>) getAttVal(feature, obj, 0, Att.COLPAT)) { 116 patterns.add(pattMap.get(pat)); 117 } 118 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), delta, new Scheme(patterns, colours)); 78 119 } 79 120 } -
applications/editors/josm/plugins/smed2/src/symbols/Notices.java
r29884 r29929 972 972 973 973 public static final Symbol NoticeBnank = new Symbol(); 974 static { 975 NoticeBnank.add(new Instr(Prim.BBOX, new Rectangle(-30,-30,60,60))); 976 Symbol colours = new Symbol(); 977 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(); 978 colours.add(new Instr(Prim.P1, p)); 979 p = new Path2D.Double(); p.moveTo(0.0,-10.0); p.lineTo(-15.0,-43.0); p.lineTo(15.0,-43.0); p.closePath(); 980 colours.add(new Instr(Prim.P2, p)); 981 NoticeBnank.add(new Instr(Prim.COLR, colours)); 982 } 974 983 public static final Symbol NoticeBlmhr = new Symbol(); 975 984 public static final Symbol NoticeBwral = new Symbol(); -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r29286 r29929 18 18 import java.awt.geom.*; 19 19 import java.util.ArrayList; 20 import java.util.EnumMap;21 22 import s57.S57val.*;23 20 24 21 public class Symbols { … … 28 25 } 29 26 27 public enum Patt { 28 Z, H, V, D, B, S, C, X 29 } 30 30 31 public enum Handle { 31 32 CC, TL, TR, TC, LC, RC, BL, BR, BC 32 }33 34 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,35 0.0843, 0.0514, 0.0313, 0.0191, 0.0117, 0.007, 0.138 };36 37 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,38 0.0529, 0.0294, 0.0163, 0.0091, 0.0050, 0.0028, 0.0163 };39 40 private static final EnumMap<ColCOL, Color> bodyColours = new EnumMap<ColCOL, Color>(ColCOL.class);41 static {42 bodyColours.put(ColCOL.COL_UNK, new Color(0, true));43 bodyColours.put(ColCOL.COL_WHT, new Color(0xffffff));44 bodyColours.put(ColCOL.COL_BLK, new Color(0x000000));45 bodyColours.put(ColCOL.COL_RED, new Color(0xd40000));46 bodyColours.put(ColCOL.COL_GRN, new Color(0x00d400));47 bodyColours.put(ColCOL.COL_BLU, Color.blue);48 bodyColours.put(ColCOL.COL_YEL, new Color(0xffd400));49 bodyColours.put(ColCOL.COL_GRY, Color.gray);50 bodyColours.put(ColCOL.COL_BRN, new Color(0x8b4513));51 bodyColours.put(ColCOL.COL_AMB, new Color(0xfbf00f));52 bodyColours.put(ColCOL.COL_VIO, new Color(0xee82ee));53 bodyColours.put(ColCOL.COL_ORG, Color.orange);54 bodyColours.put(ColCOL.COL_MAG, new Color(0xf000f0));55 bodyColours.put(ColCOL.COL_PNK, Color.pink);56 33 } 57 34 … … 77 54 78 55 public static class Scheme { 79 public ArrayList< ColPAT> pat;80 public ArrayList<Col COL> col;81 82 public Scheme(ArrayList< ColPAT> ipat, ArrayList<ColCOL> icol) {56 public ArrayList<Patt> pat; 57 public ArrayList<Color> col; 58 59 public Scheme(ArrayList<Patt> ipat, ArrayList<Color> icol) { 83 60 pat = ipat; 84 61 col = icol; … … 205 182 case P1: 206 183 if (cn > 0) { 207 g2.setPaint( bodyColours.get(cs.col.get(0)));184 g2.setPaint(cs.col.get(0)); 208 185 g2.fill((Path2D.Double) patch.params); 209 186 } … … 212 189 if (cn > 0) { 213 190 if (cn > 1) { 214 g2.setPaint( bodyColours.get(cs.col.get(1)));191 g2.setPaint(cs.col.get(1)); 215 192 } else { 216 g2.setPaint( bodyColours.get(cs.col.get(0)));193 g2.setPaint(cs.col.get(0)); 217 194 } 218 195 g2.fill((Path2D.Double) patch.params); … … 220 197 break; 221 198 case H2: 222 if ((cn > 1) && (cs.pat.get(0) == ColPAT.PAT_HORI)) {223 g2.setPaint( bodyColours.get(cs.col.get(cs.col.size() - pn)));199 if ((cn > 1) && (cs.pat.get(0) == Patt.H)) { 200 g2.setPaint(cs.col.get(cs.col.size() - pn)); 224 201 g2.fill((Path2D.Double) patch.params); 225 202 } 226 203 break; 227 204 case H3: 228 if ((cn == 3) && (cs.pat.get(0) == ColPAT.PAT_HORI)) {229 g2.setPaint( bodyColours.get(cs.col.get(1)));205 if ((cn == 3) && (cs.pat.get(0) == Patt.H)) { 206 g2.setPaint(cs.col.get(1)); 230 207 g2.fill((Path2D.Double) patch.params); 231 208 } 232 209 break; 233 210 case H4: 234 if ((cn == 4) && (cs.pat.get(0) == ColPAT.PAT_HORI)) {235 g2.setPaint( bodyColours.get(cs.col.get(1)));211 if ((cn == 4) && (cs.pat.get(0) == Patt.H)) { 212 g2.setPaint(cs.col.get(1)); 236 213 g2.fill((Path2D.Double) patch.params); 237 214 } 238 215 break; 239 216 case H5: 240 if ((cn == 4) && (cs.pat.get(0) == ColPAT.PAT_HORI)) {241 g2.setPaint( bodyColours.get(cs.col.get(2)));217 if ((cn == 4) && (cs.pat.get(0) == Patt.H)) { 218 g2.setPaint(cs.col.get(2)); 242 219 g2.fill((Path2D.Double) patch.params); 243 220 } 244 221 break; 245 222 case V2: 246 if ((cn > 1) && (cs.pat.get(0) == ColPAT.PAT_VERT)) {247 g2.setPaint( bodyColours.get(cs.col.get(cs.col.size() - pn)));223 if ((cn > 1) && (cs.pat.get(0) == Patt.V)) { 224 g2.setPaint(cs.col.get(cs.col.size() - pn)); 248 225 g2.fill((Path2D.Double) patch.params); 249 226 }
Note:
See TracChangeset
for help on using the changeset viewer.