Changeset 35392 in osm for applications/editors/josm/plugins/seachart/src/render
- Timestamp:
- 2020-03-22T12:03:02+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r35391 r35392 25 25 26 26 import s57.S57map; 27 import s57.S57map.Feature; 27 28 import s57.S57map.GeomIterator; 28 29 import s57.S57map.Pflag; … … 331 332 if (context.grid() > 0) { 332 333 LineStyle style = new LineStyle(Color.black, (float)2.0); 333 double nspan = 60 * Math.toDegrees(map.bounds.maxlon - map.bounds.minlon) / 5.0;334 double nspan = 60 * Math.toDegrees(map.bounds.maxlon - map.bounds.minlon) / context.grid(); 334 335 double mult = 1.0; 335 336 if (nspan < 1.0) { … … 373 374 g2.setPaint(style.line); 374 375 g2.draw(p); 375 double tspan = 60 * Math.toDegrees(map.bounds.maxlat - map.bounds.minlat) / 5.0;376 double tspan = 60 * Math.toDegrees(map.bounds.maxlat - map.bounds.minlat) / context.grid(); 376 377 mult = 1.0; 377 378 if (tspan < 1.0) { … … 413 414 g2.setPaint(style.line); 414 415 g2.draw(p); 415 } 416 /* Symbol legend = new Symbol(); 417 legend.add(new Instr(Form.BBOX, new Rectangle2D.Double(0, 0, 900, 300))); 418 Path2D.Double path = new Path2D.Double(); path.moveTo(0, 0); path.lineTo(900, 0); path.lineTo(900, 300); path.lineTo(0, 300); path.closePath(); 419 legend.add(new Instr(Form.FILL, Color.white)); 420 legend.add(new Instr(Form.PGON, path)); 421 legend.add(new Instr(Form.TEXT, new Caption("© OpenStreetMap contributors", new Font("Arial", Font.PLAIN, 25), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(450, 300))))); 422 legend.add(new Instr(Form.TEXT, new Caption("Mercator projection", new Font("Arial", Font.PLAIN, 30), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(450, 250))))); 423 Point2D point = context.getPoint(new Snode(map.bounds.minlat, map.bounds.minlon)); 424 Symbols.drawSymbol(g2, legend, sScale, point.getX(), point.getY(), null, new Delta(Handle.BL, AffineTransform.getTranslateInstance(0, 0))); 425 legend = new Symbol(); 426 legend.add(new Instr(Form.BBOX, new Rectangle2D.Double(0, 0, 900, 300))); 427 legend.add(new Instr(Form.TEXT, new Caption("Mercator projection", new Font("Arial", Font.PLAIN, 30), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(450, 250))))); 428 point = context.getPoint(new Snode(map.bounds.minlat, map.bounds.minlon)); 429 Symbols.drawSymbol(g2, legend, sScale, point.getX(), point.getY(), null, new Delta(Handle.BL, AffineTransform.getTranslateInstance(0, 0))); 430 */ } 416 431 } 417 432
Note:
See TracChangeset
for help on using the changeset viewer.