fi.faidon.jvg
Class PNGReader

java.lang.Object
  |
  +--fi.faidon.jvg.VectorImageProducer
        |
        +--fi.faidon.jvg.PNGReader

public class PNGReader
extends VectorImageProducer

Class for reading PNG image files and creating corresponding Java AWT images.


Constructor Summary
PNGReader()
          Initialize stuff.
 
Method Summary
 int checkImage()
          Implements VectorImageProducer drawIntoImage().
 int getHeight()
          Implements VectorImageProducer getHeight().
 java.awt.Image getImage()
          Return the image.
 int getWidth()
          Implements VectorImageProducer getWidth().
 boolean isVerbose(boolean state)
          Return if verbose or not.
 void playIt(java.awt.Graphics g, java.awt.Component c)
          Implements VectorImageProducer drawIt().
 boolean readPNGFile()
          Open and read the PNG file.
 void setImageFile(java.lang.String filePath)
          Sets the path of the image file to use.
 void setVerbose(boolean state)
          Sets verbose to the state indicated.
 
Methods inherited from class fi.faidon.jvg.VectorImageProducer
playIt, playIt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNGReader

public PNGReader()
Initialize stuff.

Method Detail

getWidth

public int getWidth()
Implements VectorImageProducer getWidth(). If we don't know the frame size yet, then read it in.

Specified by:
getWidth in class VectorImageProducer

getHeight

public int getHeight()
Implements VectorImageProducer getHeight(). If we don't know the frame size yet, then read it in.

Specified by:
getHeight in class VectorImageProducer

getImage

public java.awt.Image getImage()
Return the image.


playIt

public void playIt(java.awt.Graphics g,
                   java.awt.Component c)
Implements VectorImageProducer drawIt(). Read in the whole Pixmap, create the image and draw it.

Specified by:
playIt in class VectorImageProducer

checkImage

public int checkImage()
Implements VectorImageProducer drawIntoImage(). Return the status of the drawing launched by drawIntoImage. NOT IMPLEMENTED YET!.

Specified by:
checkImage in class VectorImageProducer

setImageFile

public void setImageFile(java.lang.String filePath)
Sets the path of the image file to use.


setVerbose

public void setVerbose(boolean state)
Sets verbose to the state indicated.


isVerbose

public boolean isVerbose(boolean state)
Return if verbose or not.


readPNGFile

public boolean readPNGFile()
Open and read the PNG file. Create the corresponding MemoryImage. If "verbose" is true, the chunks read are listed on stdout.