org.millscript.millscript.render
Class ImageRender

java.lang.Object
  extended by org.millscript.millscript.render.ImageRender
Direct Known Subclasses:
JPEGRender, PNGRender

public abstract class ImageRender
extends java.lang.Object

This is the parent of all image renderers in MillScript. Subclasses simply need to set the relevant image writer and SVG transcoder.


Constructor Summary
ImageRender()
           
 
Method Summary
 void renderImage(Image image, org.millscript.commons.vfs.VFile outFile)
          Renders the specified image to the specified output file.
 void renderImageToStream(Image image, java.io.OutputStream ostream)
          Renders the specified image to the specified output stream.
 void write(java.awt.image.BufferedImage image, java.io.OutputStream ostream)
          Performs the general writing step from the specified image to the specified output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRender

public ImageRender()
Method Detail

renderImage

public void renderImage(Image image,
                        org.millscript.commons.vfs.VFile outFile)
Renders the specified image to the specified output file.

Parameters:
image - the image to render to the output
outFile - the virtual file to render the image to

renderImageToStream

public void renderImageToStream(Image image,
                                java.io.OutputStream ostream)
                         throws java.io.IOException
Renders the specified image to the specified output stream. This method is overriden to support SVG images.

Parameters:
image - the image to render
ostream - the output to render to
Throws:
java.io.IOException - thrown if an IO error occurs

write

public final void write(java.awt.image.BufferedImage image,
                        java.io.OutputStream ostream)
                 throws java.io.IOException
Performs the general writing step from the specified image to the specified output.

Parameters:
image - the image to write
ostream - the output stream to write to
Throws:
java.io.IOException - thrown if any IO problems occur


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.