Class ImageFormGenerator
java.lang.Object
org.apache.xmlgraphics.ps.FormGenerator
org.apache.xmlgraphics.ps.ImageFormGenerator
Abstract helper class for generating PostScript forms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate ColorSpaceprivate ImageEncoderprivate RenderedImageprivate booleanprivate Dimension -
Constructor Summary
ConstructorsConstructorDescriptionImageFormGenerator(String formName, String title, Dimension2D dimensions, Dimension dimensionsPx, ImageEncoder encoder, ColorSpace colorSpace, boolean invertImage) Main constructor.ImageFormGenerator(String formName, String title, Dimension2D dimensions, Dimension dimensionsPx, ImageEncoder encoder, ColorSpace colorSpace, int bitsPerComponent, boolean invertImage) Main constructor.ImageFormGenerator(String formName, String title, Dimension2D dimensions, RenderedImage image, boolean invertImage) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGenerates some PostScript code right after the form definition (used primarily for bitmap data).protected voidGenerates the PostScript code for the PaintProc of the form.private Stringprotected StringReturns the name of the data segment associated with this image form.Methods inherited from class FormGenerator
generate, getBBox, getDimensions, getFormName, getMatrix, getTitle
-
Field Details
-
image
-
encoder
-
colorSpace
-
bitsPerComponent
private int bitsPerComponent -
invertImage
private boolean invertImage -
pixelDimensions
-
-
Constructor Details
-
ImageFormGenerator
public ImageFormGenerator(String formName, String title, Dimension2D dimensions, RenderedImage image, boolean invertImage) Main constructor.- Parameters:
formName- the form's nametitle- the form's title or nulldimensions- the form's dimensions in units (usually points)image- the imageinvertImage- true if the image shall be inverted
-
ImageFormGenerator
public ImageFormGenerator(String formName, String title, Dimension2D dimensions, Dimension dimensionsPx, ImageEncoder encoder, ColorSpace colorSpace, int bitsPerComponent, boolean invertImage) Main constructor.- Parameters:
formName- the form's nametitle- the form's title or nulldimensions- the form's dimensions in units (usually points)dimensionsPx- the form's dimensions in pixelsencoder- the image encodercolorSpace- the target color spacebitsPerComponent- the bits per componentinvertImage- true if the image shall be inverted
-
ImageFormGenerator
public ImageFormGenerator(String formName, String title, Dimension2D dimensions, Dimension dimensionsPx, ImageEncoder encoder, ColorSpace colorSpace, boolean invertImage) Main constructor.- Parameters:
formName- the form's nametitle- the form's title or nulldimensions- the form's dimensions in units (usually points)dimensionsPx- the form's dimensions in pixelsencoder- the image encodercolorSpace- the target color spaceinvertImage- true if the image shall be inverted
-
-
Method Details
-
getDataName
Returns the name of the data segment associated with this image form.- Returns:
- the data segment name
-
getAdditionalFilters
-
generatePaintProc
Generates the PostScript code for the PaintProc of the form.- Specified by:
generatePaintProcin classFormGenerator- Parameters:
gen- the PostScript generator- Throws:
IOException- if an I/O error occurs
-
generateAdditionalDataStream
Generates some PostScript code right after the form definition (used primarily for bitmap data).- Overrides:
generateAdditionalDataStreamin classFormGenerator- Parameters:
gen- the PostScript generator- Throws:
IOException- if an I/O error occurs
-