org.jmol.export.image
Class PpmEncoder

java.lang.Object
  extended by org.jmol.export.image.ImageEncoder
      extended by org.jmol.export.image.PpmEncoder
All Implemented Interfaces:
java.awt.image.ImageConsumer

public class PpmEncoder
extends ImageEncoder


Field Summary
 
Fields inherited from class org.jmol.export.image.ImageEncoder
out
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
PpmEncoder(java.awt.Image img, java.io.OutputStream out)
           
PpmEncoder(java.awt.image.ImageProducer prod, java.io.OutputStream out)
           
 
Method Summary
(package private)  void encodeDone()
           
(package private)  void encodePixels(int x, int y, int w, int h, int[] rgbPixels, int off, int scansize)
           
(package private)  void encodeStart(int width, int height)
           
(package private) static void writeString(java.io.OutputStream out, java.lang.String str)
           
 
Methods inherited from class org.jmol.export.image.ImageEncoder
encode, imageComplete, setColorModel, setDimensions, setHints, setPixels, setPixels, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PpmEncoder

public PpmEncoder(java.awt.Image img,
                  java.io.OutputStream out)

PpmEncoder

public PpmEncoder(java.awt.image.ImageProducer prod,
                  java.io.OutputStream out)
Method Detail

encodeStart

void encodeStart(int width,
                 int height)
           throws java.io.IOException
Specified by:
encodeStart in class ImageEncoder
Throws:
java.io.IOException

writeString

static void writeString(java.io.OutputStream out,
                        java.lang.String str)
                 throws java.io.IOException
Throws:
java.io.IOException

encodePixels

void encodePixels(int x,
                  int y,
                  int w,
                  int h,
                  int[] rgbPixels,
                  int off,
                  int scansize)
            throws java.io.IOException
Specified by:
encodePixels in class ImageEncoder
Throws:
java.io.IOException

encodeDone

void encodeDone()
          throws java.io.IOException
Specified by:
encodeDone in class ImageEncoder
Throws:
java.io.IOException