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 PDFImagecreatePDFImage(org.apache.xmlgraphics.image.loader.Image image, String xobjectKey) Creates a PDF image object out of the given image.voidhandleImage(RenderingContext context, org.apache.xmlgraphics.image.loader.Image image, Rectangle pos) Handles the givenImageinstance painting it at the indicated position in the output format being generated.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ImageHandler
isCompatibleMethods inherited from interface 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 givenImageinstance painting it at the indicated position in the output format being generated.- Specified by:
handleImagein 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
PDFImageimplementation that can handle the flavour of the given image
-