Changeset 30022 in osm for applications/editors/josm/plugins/smed2/src/seamap
- Timestamp:
- 2013-10-13T19:17:33+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/seamap
- Files:
-
- 2 edited
-
Renderer.java (modified) (2 diffs)
-
Rules.java (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r30020 r30022 143 143 } 144 144 145 public static void lineSymbols(Feature feature, Symbol prisymb, double space, Symbol secsymb, int ratio) { 145 public static void lineSymbols(Feature feature, Symbol prisymb, double space, Symbol secsymb, int ratio, Color col) { 146 146 Area area; 147 147 switch (feature.flag) { … … 207 207 } 208 208 if (!gap) { 209 Symbols.drawSymbol(g2, symbol, sScale, curr.getX(), curr.getY(), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.atan2((succ.getY() - curr.getY()), (succ.getX() - curr.getX())) + Math.toRadians(90))), null); 209 Symbols.drawSymbol(g2, symbol, sScale, curr.getX(), curr.getY(), 210 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.atan2((succ.getY() - curr.getY()), (succ.getX() - curr.getX())) + Math.toRadians(90))), 211 new Scheme(col)); 210 212 } 211 213 if (space > 0) -
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30020 r30022 140 140 case RESARE: 141 141 if (zoom >= 12) { 142 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0); 142 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0, new Color(0x80c480)); 143 143 // if ((CatREA)Renderer.getAttVal(feature, feature.type, 0, Att.CATREA) == CatREA.REA_NWAK) 144 144 // Renderer.symbol(feature, Areas.NoWake, Obj.RESARE, null); … … 199 199 if (zoom >= 12) { 200 200 Renderer.symbol(feature, Areas.Plane, Obj.SPLARE, null, null); 201 Renderer.lineSymbols(feature, Areas.Restricted, 0.5, Areas.LinePlane, 10); 201 Renderer.lineSymbols(feature, Areas.Restricted, 0.5, Areas.LinePlane, 10, new Color(0x80c480)); 202 202 } 203 203 if ((zoom >= 15) && (name != null)) … … 268 268 if (zoom >= 14) { 269 269 if (feature.type == Obj.CBLSUB) { 270 Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0); 270 Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0, new Color(0x80c480)); 271 271 } else if (feature.type == Obj.CBLOHD) { 272 272 … … 311 311 case ACHARE: 312 312 if (zoom >= 12) { 313 if (feature.flag != Fflag.LINE) 314 Renderer.symbol(feature, Harbours.Anchorage, null, null, null); 315 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10); 313 if (feature.flag != Fflag.AREA) { 314 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Color.black)); 315 } else { 316 Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff))); 317 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, new Color(0xc480ff)); 318 } 316 319 if ((zoom >= 15) && ((name) != null)) { 317 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), new Color(0x 80c480ff), 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))); 318 321 } 319 322 } … … 705 708 if (zoom >= 14) { 706 709 if (feature.type == Obj.PIPSOL) { 707 Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, 0); 710 Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, 0, new Color(0x80c480)); 708 711 } else if (feature.type == Obj.PIPOHD) { 709 712 … … 748 751 case TSSRON: 749 752 if (zoom <= 15) 750 Renderer.lineVector(feature, new LineStyle(null, 0, null, new Color(0x80c480 ff, true)));753 Renderer.lineVector(feature, new LineStyle(null, 0, null, new Color(0x80c48080, true))); 751 754 else 752 Renderer.lineVector(feature, new LineStyle(new Color(0x80c480 ff, true), 20, null, null));755 Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null)); 753 756 AttItem name = feature.atts.get(Att.OBJNAM); 754 757 if ((zoom >= 10) && (name != null)) 755 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), new Color(0x80c480 ff), null);758 Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), new Color(0x80c48080), null); 756 759 break; 757 760 case TSELNE: 758 Renderer.lineVector(feature, new LineStyle(new Color(0x80c480 ff, true), 20, null, null));761 Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null)); 759 762 break; 760 763 case TSSLPT: 761 Renderer.lineSymbols(feature, Areas.LaneArrow, 0.5, null, 0); 764 Renderer.lineSymbols(feature, Areas.LaneArrow, 0.5, null, 0, new Color(0x80c48080, true)); 762 765 break; 763 766 case TSSBND: 764 Renderer.lineVector(feature, new LineStyle(new Color(0x80c480 ff, true), 20, new float[] { 40, 40 }, null));767 Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, new float[] { 40, 40 }, null)); 765 768 break; 766 769 case ISTZNE: 767 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0); 770 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0, new Color(0x80c48080, true)); 768 771 break; 769 772 }
Note:
See TracChangeset
for help on using the changeset viewer.
