Changeset 31014 in osm for applications/editors/josm/plugins/seachart/src/render
- Timestamp:
- 2015-02-17T14:05:54+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/seachart/src/render
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r30894 r31014 251 251 while (git.hasComp()) { 252 252 git.nextComp(); 253 boolean first = true; 253 254 while (git.hasEdge()) { 254 255 git.nextEdge(); 255 256 point = context.getPoint(git.next()); 256 p.moveTo(point.getX(), point.getY()); 257 if (first) { 258 p.moveTo(point.getX(), point.getY()); 259 first = false; 260 } else { 261 p.lineTo(point.getX(), point.getY()); 262 } 257 263 while (git.hasNode()) { 258 264 point = context.getPoint(git.next()); -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r30992 r31014 28 28 public class Rules { 29 29 30 public static final Color Yland = new Color(0xeca818); 31 public static final Color Bwater = new Color(0x2ea8d8); 30 public static final Color Yland = new Color(0xdcb820); 31 public static final Color Bwater = new Color(0x3ea8c8); 32 public static final Color Gdries = new Color(0x50b050); 32 33 public static final Color Mline = new Color(0xc480ff); 33 34 public static final Color Msymb = new Color(0xa30075); … … 176 177 public static void rules () { 177 178 ArrayList<Feature> objects; 179 if ((objects = Renderer.map.features.get(Obj.LNDARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 180 if ((objects = Renderer.map.features.get(Obj.LAKARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 181 if ((objects = Renderer.map.features.get(Obj.RIVBNK)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 182 if ((objects = Renderer.map.features.get(Obj.RIVERS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) waterways(feature); 183 if ((objects = Renderer.map.features.get(Obj.CANALS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) waterways(feature); 184 if ((objects = Renderer.map.features.get(Obj.DOCARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 185 if ((objects = Renderer.map.features.get(Obj.DEPARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 178 186 if ((objects = Renderer.map.features.get(Obj.COALNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 179 187 if ((objects = Renderer.map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) shoreline(feature); … … 199 207 if ((objects = Renderer.map.features.get(Obj.UWTROC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) obstructions(feature); 200 208 if ((objects = Renderer.map.features.get(Obj.MARCUL)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 201 if ((objects = Renderer.map.features.get(Obj.WTWAXS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) waterways(feature);202 209 if ((objects = Renderer.map.features.get(Obj.RECTRC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) transits(feature); 203 210 if ((objects = Renderer.map.features.get(Obj.NAVLNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) transits(feature); … … 255 262 switch (feature.type) { 256 263 case COALNE: 257 Renderer.lineVector(feature, new LineStyle(Color.black, 8, Yland)); 264 Renderer.lineVector(feature, new LineStyle(Color.black, 10)); 265 break; 266 case DEPARE: 267 Double depmax = 0.0; 268 if (((depmax = (Double) getAttVal(feature, feature.type, 0, Att.DRVAL2)) != null) && (depmax <= 0.0)) { 269 Renderer.lineVector(feature, new LineStyle(Gdries)); 270 } 271 break; 272 case DOCARE: 273 case LAKARE: 274 case RIVBNK: 275 Renderer.lineVector(feature, new LineStyle(Bwater)); 258 276 break; 259 277 case DRGARE: … … 272 290 } else { 273 291 if (Renderer.zoom >= 14) 274 Renderer.lineVector(feature, new LineStyle(null, 0, new Color(0x40ffffff, true))); 275 } 292 Renderer.lineVector(feature, new LineStyle(new Color(0x40ffffff, true))); 293 } 294 break; 295 case LNDARE: 296 Renderer.lineVector(feature, new LineStyle(Yland)); 276 297 break; 277 298 case MARCUL: … … 930 951 case TSSRON: 931 952 if (Renderer.zoom <= 15) 932 Renderer.lineVector(feature, new LineStyle(n ull, 0, null, new Color(0x80c48080, true)));953 Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true))); 933 954 else 934 955 Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null)); … … 1108 1129 1109 1130 private static void waterways(Feature feature) { 1110 1131 Renderer.lineVector(feature, new LineStyle(Bwater, 20)); 1111 1132 } 1112 1133
Note:
See TracChangeset
for help on using the changeset viewer.