Changeset 31031 in osm for applications/editors/josm/plugins/seachart
- Timestamp:
- 2015-02-20T12:34:09+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
r31028 r31031 210 210 } 211 211 212 // img = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB); 213 Rectangle rect = new Rectangle(2048, 2048); 212 int size = 256; 213 for (int i = 0; i < (12 - zoom); i++) size *= 2; 214 Rectangle rect = new Rectangle(size, size); 214 215 img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_ARGB); 215 216 Renderer.reRender(img.createGraphics(), rect, zoom, 0.05, map, context); … … 218 219 // empty = bos.size(); 219 220 // tile(zoom, 1, 0, 0); 220 FileOutputStream fos = new FileOutputStream(dstdir + "tst_" + zoom + " .png");221 FileOutputStream fos = new FileOutputStream(dstdir + "tst_" + zoom + "-" + xtile + "-" + ytile + ".png"); 221 222 bos.writeTo(fos); 222 223 fos.close(); … … 232 233 // svgGenerator.translate(-256, -256); 233 234 Renderer.reRender(svgGenerator, rect, zoom, 0.05, map, context); 234 svgGenerator.stream(dstdir + "tst_" + zoom + " .svg");235 svgGenerator.stream(dstdir + "tst_" + zoom + "-" + xtile + "-" + ytile + ".svg"); 235 236 // } 236 237 } -
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r31028 r31031 195 195 git.nextEdge(); 196 196 while (git.hasNode()) { 197 Snode node = git.next(); 198 if (node == null) continue; 197 199 prev = next; 198 next = context.getPoint( git.next());200 next = context.getPoint(node); 199 201 angle = Math.atan2(next.getY() - prev.getY(), next.getX() - prev.getX()); 200 202 piv = true; … … 265 267 } 266 268 while (git.hasNode()) { 267 point = context.getPoint(git.next()); 269 Snode node = git.next(); 270 if (node == null) continue; 271 point = context.getPoint(node); 268 272 p.lineTo(point.getX(), point.getY()); 269 273 } … … 343 347 p.moveTo(point.getX(), point.getY()); 344 348 while (git.hasNode()) { 345 point = context.getPoint(git.next()); 349 Snode node = git.next(); 350 if (node == null) continue; 351 point = context.getPoint(node); 346 352 p.lineTo(point.getX(), point.getY()); 347 353 } … … 492 498 git.nextEdge(); 493 499 while (git.hasNode()) { 500 Snode node = git.next(); 501 if (node == null) continue; 494 502 prev = next; 495 next = context.getPoint( git.next());503 next = context.getPoint(node); 496 504 angle = Math.atan2(next.getY() - prev.getY(), next.getX() - prev.getX()); 497 505 piv = true; -
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r31028 r31031 942 942 while (git.hasNode()) { 943 943 node = git.next(); 944 if (node != null) { 945 llon = lon; 946 llat = lat; 947 lat = node.lat; 948 lon = node.lon; 949 sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat)); 950 } 944 if (node == null) continue; 945 llon = lon; 946 llat = lat; 947 lat = node.lat; 948 lon = node.lon; 949 sigma += (lon * Math.sin(llat)) - (llon * Math.sin(lat)); 951 950 } 952 951 } … … 1009 1008 while (git.hasNode()) { 1010 1009 Snode node = git.next(); 1010 if (node == null) continue; 1011 1011 lat = node.lat; 1012 1012 lon = node.lon; … … 1031 1031 while (git.hasNode()) { 1032 1032 Snode node = git.next(); 1033 if (node == null) continue; 1033 1034 lat = node.lat; 1034 1035 lon = node.lon;
Note:
See TracChangeset
for help on using the changeset viewer.