Changeset 31343 in osm for applications/editors/josm/plugins/seachart
- Timestamp:
- 2015-07-06T16:44:58+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jicons/src/jicons/Jicons.java
r31157 r31343 17 17 import java.io.OutputStreamWriter; 18 18 import java.io.Writer; 19 import java.awt.Color; 19 20 import java.awt.Dimension; 20 21 import java.awt.Graphics2D; … … 33 34 import s57.S57map; 34 35 import s57.S57map.*; 36 import symbols.Symbols; 35 37 import render.*; 36 38 import render.Rules.RuleSet; … … 200 202 return Math.min(w, h); 201 203 } 204 205 @Override 206 public boolean clip() { 207 return false; 208 } 209 210 @Override 211 public Color background() { 212 return new Color(0, true); 213 } 202 214 } 203 215 } -
applications/editors/josm/plugins/seachart/src/render/ChartContext.java
r30894 r31343 10 10 package render; 11 11 12 import java.awt.Color; 12 13 import java.awt.geom.Point2D; 13 14 … … 17 18 Point2D getPoint(Snode coord); 18 19 double mile(Feature feature); 20 boolean clip(); 21 Color background(); 19 22 } -
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r31157 r31343 43 43 sScale = symbolScale[zoom] * factor; 44 44 if (map != null) { 45 Point2D tl = context.getPoint(map.new Snode(map.bounds.maxlat, map.bounds.minlon)); 46 Point2D br = context.getPoint(map.new Snode(map.bounds.minlat, map.bounds.maxlon)); 47 g2.clip(new Rectangle2D.Double(tl.getX(), tl.getY(), (br.getX() - tl.getX()), (br.getY() - tl.getY()))); 48 g2.setBackground(Symbols.Bwater); 45 if (context.clip()) { 46 Point2D tl = context.getPoint(map.new Snode(map.bounds.maxlat, map.bounds.minlon)); 47 Point2D br = context.getPoint(map.new Snode(map.bounds.minlat, map.bounds.maxlon)); 48 g2.clip(new Rectangle2D.Double(tl.getX(), tl.getY(), (br.getX() - tl.getX()), (br.getY() - tl.getY()))); 49 } 50 g2.setBackground(context.background()); 49 51 g2.clearRect(rect.x, rect.y, rect.width, rect.height); 50 52 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r31044 r31343 887 887 int i = 0; 888 888 for (AttMap atts : objs.values()) { 889 if (atts.get(Att.MARSYS) != null) sys = (MarSYS) atts.get(Att.MARSYS).val;889 if (atts.get(Att.MARSYS) != null) sys = (MarSYS)(atts.get(Att.MARSYS).val); 890 890 CatNMK cat = CatNMK.NMK_UNKN; 891 if (atts.get(Att.CATNMK) != null) cat = (CatNMK) atts.get(Att.CATNMK).val;891 if (atts.get(Att.CATNMK) != null) cat = (CatNMK)(atts.get(Att.CATNMK).val); 892 892 Symbol sym = Notices.getNotice(cat, sys); 893 893 Handle h = Handle.CC; -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r31063 r31343 283 283 284 284 public static void lights(Feature feature) { 285 Enum<ColCOL> col = null;285 /* Enum<ColCOL> col = null; 286 286 Enum<ColCOL> tcol = null; 287 287 ObjTab lights = feature.objs.get(Obj.LIGHTS); … … 412 412 AttMap m0 = group.get(i); 413 413 AttMap m1 = group.get(i+1); 414 if (((m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR) && ((int) m0.get(Att.VALNMR).val < (int)m1.get(Att.VALNMR).val)))414 if (((m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR) && ((int)(m0.get(Att.VALNMR).val) < (int)(m1.get(Att.VALNMR).val)))) 415 415 || (!m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR))) { 416 416 AttMap tmp = group.remove(i); … … 421 421 } 422 422 } 423 }423 */ } 424 424 425 425 } -
applications/editors/josm/plugins/seachart/src/s57/S57val.java
r31063 r31343 35 35 36 36 public static class AttVal<V> { 37 // public Att att;38 37 public Conv conv; 39 38 public V val; 40 // AttVal(Att a, Conv c, V v) {41 // att = a; conv = c; val = v;42 // }43 39 AttVal(Conv c, V v) { 44 40 conv = c; val = v; -
applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java
r31044 r31343 32 32 import render.Rules.RuleSet; 33 33 import s57.S57map.*; 34 import symbols.Symbols; 34 35 35 36 public class ChartImage extends ImageryLayer implements ZoomChangeListener, ChartContext { … … 93 94 return 185000 / Main.map.mapView.getDist100Pixel(); 94 95 } 96 97 public boolean clip() { 98 return true; 99 } 100 101 public Color background() { 102 return (Symbols.Bwater); 103 } 95 104 } -
applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java
r31157 r31343 112 112 protected void createChartLayer() { 113 113 rendering = new ChartImage(new ImageryInfo("SeaChart")); 114 rendering.setBackgroundLayer(true);115 114 Main.main.addLayer(rendering); 116 115 MapView.addEditLayerChangeListener(this); 117 116 MapView.addLayerChangeListener(this); 118 117 editLayerChanged(Main.main.getEditLayer(), Main.main.getEditLayer()); 118 rendering.setBackgroundLayer(true); 119 119 } 120 120
Note:
See TracChangeset
for help on using the changeset viewer.