org.bootchart.renderer
Class ImageRenderer
java.lang.Object
org.bootchart.renderer.Renderer
org.bootchart.renderer.ImageRenderer
- Direct Known Subclasses:
- EPSRenderer, PNGRenderer
- public abstract class ImageRenderer
- extends Renderer
ImageRenderer renders the boot chart as a Java 2D
BufferedImage
. Subclasses may then encode the image in
different formats (e.g. PNG or EPS).
Field Summary |
protected boolean |
allowAlpha
Whether to allow usage of transparency. |
protected java.awt.Graphics |
g
|
protected java.awt.image.BufferedImage |
img
|
Method Summary |
abstract java.lang.String |
getFileSuffix()
Returns the file suffix to use for the rendered image. |
void |
render(java.util.Properties headers,
BootStats bootStats,
java.io.OutputStream os)
Render the chart. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
g
protected java.awt.Graphics g
img
protected java.awt.image.BufferedImage img
allowAlpha
protected boolean allowAlpha
- Whether to allow usage of transparency. Certain renderers (e.g. EPS)
will produce better results if the colors aren't transparent.
ImageRenderer
public ImageRenderer()
render
public void render(java.util.Properties headers,
BootStats bootStats,
java.io.OutputStream os)
throws java.io.IOException
- Render the chart.
- Specified by:
render
in class Renderer
- Parameters:
headers
- header properties to include in the title bannerbootStats
- boot statisticsos
- the output stream to write t
- Throws:
java.io.IOException
- if an I/O error occurs
getFileSuffix
public abstract java.lang.String getFileSuffix()
- Description copied from class:
Renderer
- Returns the file suffix to use for the rendered image.
- Specified by:
getFileSuffix
in class Renderer
- Returns:
- file suffix