public class SimpleSVGImageWorker extends ImageWorker
RRDGraph graph = new RrdGraph(graphdef, new SimpleSVGImageWorker(width, height)); outputstream.write(graph.getRrdGraphInfo().getBytes());License: Apache 2.0 (same as rrd4j)
Constructor and Description |
---|
SimpleSVGImageWorker(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
protected void |
drawString(String text,
int x,
int y,
Font font,
Paint paint)
Overridden because the SVG format essentially strips leading/trailing spaces,
causing alignment issues in ValueAxis with the %x.y number formatting.
|
protected double |
getStringWidth(String text,
Font font)
Overridden because the SVG format essentially strips leading/trailing spaces,
causing alignment issues in ValueAxis with the %x.y number formatting.
|
protected void |
makeImage(OutputStream os) |
protected void |
reset(Graphics2D g2d)
reset the dimensions of the
Graphics2D |
protected void |
resize(int width,
int height) |
clip, dispose, drawLine, drawPolyline, fillPolygon, fillPolygon, fillRect, getFontAscent, getFontHeight, getImageBytes, loadImage, makeImage, reset, saveImage, setAntiAliasing, setG2d, setTextAntiAliasing, transform
protected void resize(int width, int height)
resize
in class ImageWorker
protected void reset(Graphics2D g2d)
ImageWorker
Graphics2D
reset
in class ImageWorker
protected void makeImage(OutputStream os) throws IOException
makeImage
in class ImageWorker
IOException
protected void drawString(String text, int x, int y, Font font, Paint paint)
drawString
in class ImageWorker
protected double getStringWidth(String text, Font font)
getStringWidth
in class ImageWorker