Changeset 31532 in osm for applications/editors/josm/plugins/seachart/jicons
- Timestamp:
- 2015-08-29T16:55:46+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jicons/src/jicons/Jicons.java
r31344 r31532 35 35 import s57.S57map.*; 36 36 import render.*; 37 import render.Rules.RuleSet;38 37 39 38 public class Jicons { … … 80 79 img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); 81 80 g2 = img.createGraphics(); 82 Renderer.reRender(g2, RuleSet.SEAMARK,new Rectangle(x, y, w, h), 16, s / Renderer.symbolScale[16], map, context);81 Renderer.reRender(g2, new Rectangle(x, y, w, h), 16, s / Renderer.symbolScale[16], map, context); 83 82 try { 84 83 ImageIO.write(img, "png", new File(args[1] + file + ".png")); … … 94 93 SVGGraphics2D svgGenerator = new SVGGraphics2D(document); 95 94 svgGenerator.setSVGCanvasSize(new Dimension(w, h)); 96 Renderer.reRender(svgGenerator, RuleSet.SEAMARK,new Rectangle(x, y, w, h), 16, s / Renderer.symbolScale[16], map, context);95 Renderer.reRender(svgGenerator, new Rectangle(x, y, w, h), 16, s / Renderer.symbolScale[16], map, context); 97 96 boolean useCSS = true; 98 97 Writer out = null; … … 192 191 static class Context implements ChartContext { 193 192 194 @Override195 193 public Point2D getPoint(Snode coord) { 196 194 return new Point2D.Double(x, y); 197 195 } 198 196 199 @Override200 197 public double mile(Feature feature) { 201 198 return Math.min(w, h); 202 199 } 203 200 204 @Override205 201 public boolean clip() { 206 202 return false; 207 203 } 208 204 209 @Override210 205 public Color background() { 211 206 return new Color(0, true); 212 207 } 208 209 public RuleSet ruleset() { 210 return RuleSet.SEAMARK; 211 } 213 212 } 214 213 }
Note:
See TracChangeset
for help on using the changeset viewer.