Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartExportHelper.java @ 1036:e6aff80b59ff
Added proof-of-concept collision detection for text annotations.
flys-artifacts/trunk@2497 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 17 Aug 2011 09:16:20 +0000 |
parents | 2f25ca828efd |
children | 5966a20fc72c |
comparison
equal
deleted
inserted
replaced
1035:9f69a5f0af98 | 1036:e6aff80b59ff |
---|---|
25 | 25 |
26 import java.io.IOException; | 26 import java.io.IOException; |
27 import java.io.OutputStream; | 27 import java.io.OutputStream; |
28 import java.io.OutputStreamWriter; | 28 import java.io.OutputStreamWriter; |
29 import java.io.UnsupportedEncodingException; | 29 import java.io.UnsupportedEncodingException; |
30 import org.jfree.chart.ChartRenderingInfo; | |
30 | 31 |
31 import javax.imageio.ImageIO; | 32 import javax.imageio.ImageIO; |
32 | 33 |
33 import org.apache.batik.svggen.SVGGraphics2D; | 34 import org.apache.batik.svggen.SVGGraphics2D; |
34 import org.apache.batik.svggen.SVGGraphics2DIOException; | 35 import org.apache.batik.svggen.SVGGraphics2DIOException; |
87 ) | 88 ) |
88 throws IOException | 89 throws IOException |
89 { | 90 { |
90 log.info("export chart as png"); | 91 log.info("export chart as png"); |
91 | 92 |
93 ChartRenderingInfo info = new ChartRenderingInfo(); | |
94 | |
92 ImageIO.write( | 95 ImageIO.write( |
93 chart.createBufferedImage( | 96 chart.createBufferedImage( |
94 width, height, Transparency.BITMASK, null | 97 width, height, Transparency.BITMASK, info |
95 ), | 98 ), |
96 format, | 99 format, |
97 out | 100 out |
98 ); | 101 ); |
99 } | 102 } |