Changeset 30023 in osm for applications/editors
- Timestamp:
- 2013-10-13T23:49:37+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r30022 r30023 304 304 label.add(new Instr(Prim.TEXT, new Caption(str, font, colour, (delta == null) ? new Delta(Handle.CC, null) : delta))); 305 305 Point2D point = helper.getPoint(feature.centre); 306 Symbols.drawSymbol(g2, label, tScale, point.getX(), point.getY(), null, null);306 Symbols.drawSymbol(g2, label, sScale, point.getX(), point.getY(), null, null); 307 307 } 308 308 -
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30022 r30023 318 318 } 319 319 if ((zoom >= 15) && ((name) != null)) { 320 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), new Color(0xc480ff), new Delta(Handle.BC, AffineTransform.getTranslateInstance(160, 0)));320 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), new Color(0xc480ff), new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0))); 321 321 } 322 ArrayList<StsSTS> sts = (ArrayList<StsSTS>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.STATUS); 323 if ((zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) { 324 Renderer.labelText(feature, "Reserved", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60))); 325 } 326 } 327 ArrayList<CatACH> cats = (ArrayList<CatACH>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.CATACH); 328 int dy = (cats.size() - 1) * -30; 329 for (CatACH cat : cats) { 330 switch (cat) { 331 case ACH_DEEP: 332 Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 333 dy += 60; 334 break; 335 case ACH_TANK: 336 Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 337 dy += 60; 338 break; 339 case ACH_H24P: 340 Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), new Color(0xc480ff), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 341 dy += 60; 342 break; 343 case ACH_EXPL: 344 Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff))); 345 dy += 60; 346 break; 347 case ACH_QUAR: 348 Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff))); 349 dy += 60; 350 break; 351 case ACH_SEAP: 352 Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff))); 353 dy += 60; 354 break; 355 } 322 356 } 323 357 break; … … 325 359 } 326 360 /* 327 * if ((zoom >= 12) && is_type("anchorage")) {328 symbol("anchorage");329 if ((zoom >= 15) && (has_item_attribute("name")))330 text(item_attribute("name"), "font-family:Arial; font-weight:bold; font-size:80; text-anchor:middle", 0, -90);331 if ((zoom >= 12) && (is_area)) line_symbols("restricted_line", 0.5, "line_anchor", 10);332 }333 361 if ((zoom >= 16) && is_type("anchor_berth")) symbol("anchor_berth"); 334 362 if ((zoom >= 12) && is_type("harbour")) { -
applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java
r30022 r30023 184 184 showFrame.setVisible(false); 185 185 panelMain.clearMark(); 186 for (OsmPrimitive osm : selection) { 187 nextFeature = osm; 188 if (selection.size() == 1) { 189 if (nextFeature.compareTo(feature) != 0) { 190 feature = nextFeature; 191 Feature id = map.index.get(feature.getUniqueId()); 192 if (id != null) { 193 panelMain.parseMark(id); 194 showFrame.setVisible(true); 195 showFrame.showFeature(feature, map); 186 if (map != null) { 187 for (OsmPrimitive osm : selection) { 188 nextFeature = osm; 189 if (selection.size() == 1) { 190 if (nextFeature.compareTo(feature) != 0) { 191 feature = nextFeature; 192 Feature id = map.index.get(feature.getUniqueId()); 193 if (id != null) { 194 panelMain.parseMark(id); 195 showFrame.setVisible(true); 196 showFrame.showFeature(feature, map); 197 } 196 198 } 197 } 198 } else { 199 } else { 200 showFrame.setVisible(false); 201 PanelMain.messageBar.setText(tr("Select only one feature")); 202 } 203 } 204 if (nextFeature == null) { 205 feature = null; 206 panelMain.clearMark(); 199 207 showFrame.setVisible(false); 200 PanelMain.messageBar.setText(tr("Select only one feature")); 201 } 202 } 203 if (nextFeature == null) { 204 feature = null; 205 panelMain.clearMark(); 206 showFrame.setVisible(false); 207 PanelMain.messageBar.setText(tr("Select a map feature")); 208 PanelMain.messageBar.setText(tr("Select a map feature")); 209 } 208 210 } 209 211 } -
applications/editors/josm/plugins/smed2/src/symbols/Areas.java
r30022 r30023 20 20 static { 21 21 Plane.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120))); 22 Plane.add(new Instr(Prim.FILL, new Color(0xa30075)));23 22 Path2D.Double p = new Path2D.Double(); p.moveTo(40,20); p.lineTo(50,10); p.lineTo(27.0,13.3); p.lineTo(23.7,6.8); p.lineTo(40.0,5.0); p.curveTo(55,4,55,-9,40,-10); 24 23 p.quadTo(31,-11,30,-15); p.lineTo(-30,2); p.quadTo(-35,-12,-45,-15); p.quadTo(-56,-3,-50,15); p.lineTo(18.4,7.3); p.lineTo(21.7,14); p.lineTo(-20,20); p.closePath(); … … 126 125 public static final Symbol Seaplane = new Symbol(); 127 126 static { 127 Seaplane.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120))); 128 128 Seaplane.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 129 Seaplane.add(new Instr(Prim.FILL, new Color(0xa30075))); 130 Seaplane.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-60,-60,120,120))); 129 Seaplane.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-58,-58,116,116))); 131 130 Seaplane.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.Plane, 1.0, 0, 0, null, null))); 132 131 } -
applications/editors/josm/plugins/smed2/src/symbols/Harbours.java
r30022 r30023 108 108 static { 109 109 Explosives.add(new Instr(Prim.BBOX, new Rectangle(-30,-30,60,60))); 110 Explosives.add(new Instr(Prim.FILL, new Color(0xa30075)));111 110 Explosives.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-5,25,10,10))); 112 111 Explosives.add(new Instr(Prim.STRK, new BasicStroke(4, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)));
Note:
See TracChangeset
for help on using the changeset viewer.