Package org.jrobin.graph
Class ImageWorker
- java.lang.Object
-
- org.jrobin.graph.ImageWorker
-
class ImageWorker extends Object
-
-
Constructor Summary
Constructors Constructor Description ImageWorker(int width, int height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
clip(int x, int y, int width, int height)
(package private) void
dispose()
(package private) void
drawLine(int x1, int y1, int x2, int y2, Paint paint, Stroke stroke)
(package private) void
drawPolyline(double[] x, double[] y, Paint paint, Stroke stroke)
(package private) void
drawPolyline(int[] x, int[] y, Paint paint, Stroke stroke)
(package private) void
drawString(String text, int x, int y, Font font, Paint paint)
(package private) void
fillPolygon(double[] x, double[] yBottom, double[] yTop, Paint paint)
(package private) void
fillPolygon(double[] x, double yBottom, double[] yTop, Paint paint)
(package private) void
fillPolygon(int[] x, int[] y, Paint paint)
(package private) void
fillRect(int x, int y, int width, int height, Paint paint)
(package private) double
getFontAscent(Font font)
(package private) double
getFontHeight(Font font)
(package private) byte[]
getImageBytes(String type, float quality)
(package private) double
getStringWidth(String text, Font font)
void
loadImage(String imageFile)
(package private) void
reset()
(package private) void
resize(int width, int height)
(package private) void
saveImage(OutputStream stream, String type, float quality)
(package private) byte[]
saveImage(String path, String type, float quality)
(package private) void
setAntiAliasing(boolean enable)
(package private) void
transform(int x, int y, double angle)
-
-
-
Method Detail
-
resize
void resize(int width, int height)
-
clip
void clip(int x, int y, int width, int height)
-
transform
void transform(int x, int y, double angle)
-
reset
void reset()
-
fillRect
void fillRect(int x, int y, int width, int height, Paint paint)
-
fillPolygon
void fillPolygon(int[] x, int[] y, Paint paint)
-
fillPolygon
void fillPolygon(double[] x, double yBottom, double[] yTop, Paint paint)
-
fillPolygon
void fillPolygon(double[] x, double[] yBottom, double[] yTop, Paint paint)
-
getFontAscent
double getFontAscent(Font font)
-
getFontHeight
double getFontHeight(Font font)
-
setAntiAliasing
void setAntiAliasing(boolean enable)
-
dispose
void dispose()
-
saveImage
void saveImage(OutputStream stream, String type, float quality) throws IOException
- Throws:
IOException
-
saveImage
byte[] saveImage(String path, String type, float quality) throws IOException
- Throws:
IOException
-
getImageBytes
byte[] getImageBytes(String type, float quality) throws IOException
- Throws:
IOException
-
loadImage
public void loadImage(String imageFile) throws IOException
- Throws:
IOException
-
-