Package org.rrd4j.graph
Class ImageWorker
java.lang.Object
org.rrd4j.graph.ImageWorker
- Direct Known Subclasses:
BufferedImageWorker
,SimpleSVGImageWorker
An abstract class, that allows to use custom
Graphics2D
. To use it the construct should build it and call
setG2d(Graphics2D)
when finished.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
clip
(int x, int y, int width, int height) protected void
dispose()
protected void
protected void
drawPolyline
(double[] x, double[] y, Paint paint, Stroke stroke) protected void
drawString
(String text, int x, int y, Font font, Paint paint) protected void
fillPolygon
(double[] x, double[] yBottom, double[] yTop, Paint paint) protected void
fillPolygon
(double[] x, double yBottom, double[] yTop, Paint paint) protected void
protected double
getFontAscent
(Font font) protected double
getFontHeight
(Font font) protected byte[]
protected double
getStringWidth
(String text, Font font) protected void
loadImage
(RrdGraphDef.ImageSource imageSource, int x, int y, int w, int h) protected abstract void
protected void
protected void
reset()
protected abstract void
reset
(Graphics2D g2d) reset the dimensions of theGraphics2D
protected abstract void
resize
(int width, int height) protected void
protected void
setAntiAliasing
(boolean enable) protected void
setG2d
(Graphics2D g2d) protected void
setTextAntiAliasing
(boolean enable) protected void
transform
(int x, int y, double angle)
-
Constructor Details
-
ImageWorker
public ImageWorker()
-
-
Method Details
-
setG2d
-
resize
protected abstract void resize(int width, int height) -
clip
protected void clip(int x, int y, int width, int height) -
transform
protected void transform(int x, int y, double angle) -
reset
protected void reset() -
reset
reset the dimensions of theGraphics2D
-
fillRect
-
fillPolygon
-
fillPolygon
-
drawLine
-
drawPolyline
-
drawString
-
getFontAscent
-
getFontHeight
-
getStringWidth
-
setAntiAliasing
protected void setAntiAliasing(boolean enable) -
setTextAntiAliasing
protected void setTextAntiAliasing(boolean enable) -
loadImage
protected void loadImage(RrdGraphDef.ImageSource imageSource, int x, int y, int w, int h) throws IOException - Throws:
IOException
-
dispose
protected void dispose() -
makeImage
- Throws:
IOException
-
makeImage
- Throws:
IOException
-
saveImage
- Throws:
IOException
-
getImageBytes
- Throws:
IOException
-