Package org.apache.fop.render.pdf
Class AbstractPDFImageHandler
java.lang.Object
org.apache.fop.render.pdf.AbstractPDFImageHandler
- All Implemented Interfaces:
ImageHandler
,ImageHandlerBase
- Direct Known Subclasses:
PDFImageHandlerRawCCITTFax
,PDFImageHandlerRawJPEG
,PDFImageHandlerRawPNG
,PDFImageHandlerRenderedImage
A partial implementation of a PDF-specific image handler, containing the code that is
common between image flavors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract PDFImage
createPDFImage
(org.apache.xmlgraphics.image.loader.Image image, String xobjectKey) Creates a PDF image object out of the given image.void
handleImage
(RenderingContext context, org.apache.xmlgraphics.image.loader.Image image, Rectangle pos) Handles the givenImage
instance painting it at the indicated position in the output format being generated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.fop.render.ImageHandler
isCompatible
Methods inherited from interface org.apache.fop.render.ImageHandlerBase
getPriority, getSupportedImageClass, getSupportedImageFlavors
-
Constructor Details
-
AbstractPDFImageHandler
AbstractPDFImageHandler()
-
-
Method Details
-
handleImage
public void handleImage(RenderingContext context, org.apache.xmlgraphics.image.loader.Image image, Rectangle pos) throws IOException Handles the givenImage
instance painting it at the indicated position in the output format being generated.- Specified by:
handleImage
in interfaceImageHandler
- Parameters:
context
- the rendering contextimage
- the image to be handledpos
- the position and scaling of the image relative to the origin point of the current viewport (in millipoints)- Throws:
IOException
- if an I/O error occurs
-
createPDFImage
abstract PDFImage createPDFImage(org.apache.xmlgraphics.image.loader.Image image, String xobjectKey) Creates a PDF image object out of the given image.- Parameters:
image
- an imagexobjectKey
- a key for retrieval of the image from the document's XObject collection- Returns:
- a suitable
PDFImage
implementation that can handle the flavour of the given image
-