Changeset 30150 in osm for applications/editors/josm/plugins/smed2/src/render/Renderer.java
- Timestamp:
- 2013-12-25T11:40:00+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src/render
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/render/Renderer.java
r30123 r30150 8 8 */ 9 9 10 package seamap;10 package render; 11 11 12 12 import java.awt.*; … … 17 17 18 18 import s57.S57val.*; 19 import s eamap.SeaMap;20 import s eamap.SeaMap.*;21 import s eamap.SeaMap.Area;19 import s57.S57map; 20 import s57.S57map.*; 21 import s57.S57map.Area; 22 22 import symbols.Areas; 23 import symbols.Harbours;24 23 import symbols.Symbols; 25 24 import symbols.Symbols.*; … … 29 28 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 }; 30 29 31 public static final Color Yland = new Color(0x50b0ff);32 public static final Color Mline = new Color(0xc480ff);33 public static final Color Msymb = new Color(0xa30075);34 35 30 static final EnumMap<ColCOL, Color> bodyColours = new EnumMap<ColCOL, Color>(ColCOL.class); 36 31 static { … … 67 62 68 63 static MapContext context; 69 static S eaMap map;64 static S57map map; 70 65 static double sScale; 71 66 static Graphics2D g2; 72 67 static int zoom; 73 68 74 public static void reRender(Graphics2D g, int z, double factor, S eaMap m, MapContext c) {69 public static void reRender(Graphics2D g, int z, double factor, S57map m, MapContext c) { 75 70 g2 = g; 76 71 zoom = z; … … 82 77 g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); 83 78 g2.setStroke(new BasicStroke(0, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); 84 Rules.rules( map, zoom);79 Rules.rules(); 85 80 } 86 81 } … … 525 520 Point2D curr = new Point2D.Double(); 526 521 Point2D succ = new Point2D.Double(); 527 boolean gap = true;528 522 boolean piv = false; 529 523 double len = 0; … … 539 533 if (first) { 540 534 curr = succ = next; 541 // gap = (space > 0); 542 // len = gap ? psize * space * 0.5 : psize; 535 // len = psize; 543 536 first = false; 544 537 } else { … … 559 552 succ = new Point2D.Double(curr.getX() + (len * Math.cos(angle)), curr.getY() + (len * Math.sin(angle))); 560 553 } 561 if (!gap) {562 554 // 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); 563 }564 gap = false;565 555 curr = succ; 566 556 // len = psize;
Note:
See TracChangeset
for help on using the changeset viewer.