Class pmr.simplegraph.SimpleImage
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.simplegraph.SimpleImage
java.lang.Object
|
+----pmr.simplegraph.SimpleImage
- public class SimpleImage
- extends Object
helps to draw Images, e.g. by reading XBM
- Author:
- (C) P. Murray-Rust, 1996, and some code from Gamelan
-
SimpleImage()
- dummy constructor
-
getImageFromPM(Component, String[], String[])
- creates image using the format described above.
-
grabImage(Component)
- grab the whole of a component as an image
-
grabImage(Component, int, int, int, int)
- grab an Image from a component
-
writeBase64Image(Image)
- write an Image as a GIF (base64 encoded byte stream)
-
writeComponentAsGIF(Component, String)
- write component to gif file
-
writeImage(Image)
- write an Image as a GIF (byte stream)
-
writeImage(Image, OutputStream)
- write an Image as a GIF
-
writeImage(Image, String)
-
SimpleImage
public SimpleImage()
- dummy constructor
grabImage
public static Image grabImage(Component comp,
int x,
int y,
int width,
int height)
- grab an Image from a component
grabImage
public static Image grabImage(Component comp)
- grab the whole of a component as an image
writeComponentAsGIF
public static void writeComponentAsGIF(Component comp,
String filename) throws AWTException, IOException
- write component to gif file
- Throws: AWTException
- thrown by GIFEncoder
- Throws: IOException
- cannot write file
writeImage
public static void writeImage(Image img,
OutputStream os) throws AWTException, IOException
- write an Image as a GIF
- Throws: AWTException
- thrown by GIFEncoder
- Throws: IOException
- cannot write file
writeImage
public static ByteArrayOutputStream writeImage(Image img) throws AWTException, IOException
- write an Image as a GIF (byte stream)
- Throws: AWTException
- thrown by GIFEncoder
- Throws: IOException
- cannot write file
writeBase64Image
public static byte[] writeBase64Image(Image img) throws AWTException, IOException
- write an Image as a GIF (base64 encoded byte stream)
- Throws: AWTException
- thrown by GIFEncoder
- Throws: IOException
- cannot write file
writeImage
public static void writeImage(Image img,
String filename) throws AWTException, IOException
getImageFromPM
public static Image getImageFromPM(Component comp,
String colors[],
String bitmap[])
- creates image using the format described above. the color lines can be variable
All Packages Class Hierarchy This Package Previous Next Index