Package org.apache.xmlgraphics.ps
Class FormGenerator
java.lang.Object
org.apache.xmlgraphics.ps.FormGenerator
- Direct Known Subclasses:
ImageFormGenerator
Abstract helper class for generating PostScript forms.
-
Constructor Summary
ConstructorsConstructorDescriptionFormGenerator
(String formName, String title, Dimension2D dimensions) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptiongenerate
(PSGenerator gen) Generates the PostScript form.protected void
Generates some PostScript code right after the form definition (used primarily for bitmap data).protected abstract void
Generates the PostScript code for the PaintProc of the form.protected Rectangle2D
getBBox()
Returns the form's bounding box.returns the form's dimensions.Returns the form's name.protected AffineTransform
Returns the matrix for use in the form.getTitle()
Returns the form's title.
-
Constructor Details
-
FormGenerator
Main constructor.- Parameters:
formName
- the form's nametitle
- the form's title or nulldimensions
- the form's dimensions
-
-
Method Details
-
getFormName
Returns the form's name.- Returns:
- the form's name
-
getTitle
Returns the form's title.- Returns:
- the form's title or null if there's no title
-
getDimensions
returns the form's dimensions.- Returns:
- the form's dimensions
-
generatePaintProc
Generates the PostScript code for the PaintProc of the form.- 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).- Parameters:
gen
- the PostScript generator- Throws:
IOException
- if an I/O error occurs
-
getMatrix
Returns the matrix for use in the form.- Returns:
- the matrix
-
getBBox
Returns the form's bounding box.- Returns:
- the form's bounding box
-
generate
Generates the PostScript form.- Parameters:
gen
- the PostScript generator- Returns:
- a PSResource instance representing the form
- Throws:
IOException
- if an I/O error occurs
-