Changeset 31044 in osm for applications/editors/josm/plugins/seachart/jrender/src
- Timestamp:
- 2015-03-03T17:08:26+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
r31031 r31044 10 10 package jrender; 11 11 12 import java.awt.Dimension;13 12 import java.awt.Graphics2D; 14 13 import java.awt.Rectangle; … … 32 31 import org.w3c.dom.Document; 33 32 34 import render.ChartContext;35 import render.Renderer;36 import render.Rules;37 33 import s57.S57map; 38 34 import s57.S57map.Feature; 39 35 import s57.S57map.Snode; 36 import symbols.*; 37 import render.*; 38 import render.Rules.RuleSet; 40 39 41 40 public class Jrender { … … 214 213 Rectangle rect = new Rectangle(size, size); 215 214 img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_ARGB); 216 Renderer.reRender(img.createGraphics(), rect, zoom, 0.05, map, context);215 Renderer.reRender(img.createGraphics(), RuleSet.BASE, rect, zoom, 0.05, map, context); 217 216 ByteArrayOutputStream bos = new ByteArrayOutputStream(); 218 217 ImageIO.write(img, "png", bos); … … 227 226 Document document = domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null); 228 227 SVGGraphics2D svgGenerator = new SVGGraphics2D(document); 229 svgGenerator.setBackground( Rules.Bwater);228 svgGenerator.setBackground(Symbols.Bwater); 230 229 svgGenerator.clearRect(rect.x, rect.y, rect.width, rect.height); 231 230 svgGenerator.setSVGCanvasSize(rect.getSize()); 232 231 svgGenerator.setClip(rect.x, rect.y, rect.width, rect.height); 233 232 // svgGenerator.translate(-256, -256); 234 Renderer.reRender(svgGenerator, rect, zoom, 0.05, map, context);233 Renderer.reRender(svgGenerator, RuleSet.BASE, rect, zoom, 0.05, map, context); 235 234 svgGenerator.stream(dstdir + "tst_" + zoom + "-" + xtile + "-" + ytile + ".svg"); 236 235 // } … … 245 244 g2.scale(s, s); 246 245 g2.translate(-(256 + (xn * 256 / s)), -(256 + (yn * 256 / s))); 247 Renderer.reRender(g2, new Rectangle(256, 256), zoom, 1, map, context);246 Renderer.reRender(g2, RuleSet.BASE, new Rectangle(256, 256), zoom, 1, map, context); 248 247 ByteArrayOutputStream bos = new ByteArrayOutputStream(); 249 248 ImageIO.write(img, "png", bos);
Note:
See TracChangeset
for help on using the changeset viewer.