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

Constructor Index

 o SimpleImage()
dummy constructor

Method Index

 o getImageFromPM(Component, String[], String[])
creates image using the format described above.
 o grabImage(Component)
grab the whole of a component as an image
 o grabImage(Component, int, int, int, int)
grab an Image from a component
 o writeBase64Image(Image)
write an Image as a GIF (base64 encoded byte stream)
 o writeComponentAsGIF(Component, String)
write component to gif file
 o writeImage(Image)
write an Image as a GIF (byte stream)
 o writeImage(Image, OutputStream)
write an Image as a GIF
 o writeImage(Image, String)

Constructors

 o SimpleImage
  public SimpleImage()
dummy constructor

Methods

 o grabImage
  public static Image grabImage(Component comp,
                                int x,
                                int y,
                                int width,
                                int height)
grab an Image from a component
 o grabImage
  public static Image grabImage(Component comp)
grab the whole of a component as an image
 o 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
 o 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
 o 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
 o 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
 o writeImage
  public static void writeImage(Image img,
                                String filename) throws AWTException, IOException
 o 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