xmlgraphics-commons 1.3.1

org.apache.xmlgraphics.ps
Class ImageFormGenerator

java.lang.Object
  extended by org.apache.xmlgraphics.ps.FormGenerator
      extended by org.apache.xmlgraphics.ps.ImageFormGenerator

public class ImageFormGenerator
extends FormGenerator

Abstract helper class for generating PostScript forms.


Constructor Summary
ImageFormGenerator(java.lang.String formName, java.lang.String title, java.awt.geom.Dimension2D dimensions, java.awt.Dimension dimensionsPx, ImageEncoder encoder, java.awt.color.ColorSpace colorSpace, boolean invertImage)
          Main constructor.
ImageFormGenerator(java.lang.String formName, java.lang.String title, java.awt.geom.Dimension2D dimensions, java.awt.Dimension dimensionsPx, ImageEncoder encoder, java.awt.color.ColorSpace colorSpace, int bitsPerComponent, boolean invertImage)
          Main constructor.
ImageFormGenerator(java.lang.String formName, java.lang.String title, java.awt.geom.Dimension2D dimensions, java.awt.image.RenderedImage image, boolean invertImage)
          Main constructor.
 
Method Summary
protected  void generateAdditionalDataStream(PSGenerator gen)
          Generates some PostScript code right after the form definition (used primarily for bitmap data).
protected  void generatePaintProc(PSGenerator gen)
          Generates the PostScript code for the PaintProc of the form.
protected  java.lang.String getDataName()
          Returns the name of the data segment associated with this image form.
 
Methods inherited from class org.apache.xmlgraphics.ps.FormGenerator
generate, getBBox, getDimensions, getFormName, getMatrix, getTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFormGenerator

public ImageFormGenerator(java.lang.String formName,
                          java.lang.String title,
                          java.awt.geom.Dimension2D dimensions,
                          java.awt.image.RenderedImage image,
                          boolean invertImage)
Main constructor.

Parameters:
formName - the form's name
title - the form's title or null
dimensions - the form's dimensions in units (usually points)
image - the image
invertImage - true if the image shall be inverted

ImageFormGenerator

public ImageFormGenerator(java.lang.String formName,
                          java.lang.String title,
                          java.awt.geom.Dimension2D dimensions,
                          java.awt.Dimension dimensionsPx,
                          ImageEncoder encoder,
                          java.awt.color.ColorSpace colorSpace,
                          int bitsPerComponent,
                          boolean invertImage)
Main constructor.

Parameters:
formName - the form's name
title - the form's title or null
dimensions - the form's dimensions in units (usually points)
dimensionsPx - the form's dimensions in pixels
encoder - the image encoder
colorSpace - the target color space
bitsPerComponent - the bits per component
invertImage - true if the image shall be inverted

ImageFormGenerator

public ImageFormGenerator(java.lang.String formName,
                          java.lang.String title,
                          java.awt.geom.Dimension2D dimensions,
                          java.awt.Dimension dimensionsPx,
                          ImageEncoder encoder,
                          java.awt.color.ColorSpace colorSpace,
                          boolean invertImage)
Main constructor.

Parameters:
formName - the form's name
title - the form's title or null
dimensions - the form's dimensions in units (usually points)
dimensionsPx - the form's dimensions in pixels
encoder - the image encoder
colorSpace - the target color space
invertImage - true if the image shall be inverted
Method Detail

getDataName

protected java.lang.String getDataName()
Returns the name of the data segment associated with this image form.

Returns:
the data segment name

generatePaintProc

protected void generatePaintProc(PSGenerator gen)
                          throws java.io.IOException
Generates the PostScript code for the PaintProc of the form.

Specified by:
generatePaintProc in class FormGenerator
Parameters:
gen - the PostScript generator
Throws:
java.io.IOException - if an I/O error occurs

generateAdditionalDataStream

protected void generateAdditionalDataStream(PSGenerator gen)
                                     throws java.io.IOException
Generates some PostScript code right after the form definition (used primarily for bitmap data).

Overrides:
generateAdditionalDataStream in class FormGenerator
Parameters:
gen - the PostScript generator
Throws:
java.io.IOException - if an I/O error occurs

xmlgraphics-commons 1.3.1

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.