Package org.apache.fop.render.afp
Class AFPImageHandler
java.lang.Object
org.apache.fop.render.afp.AFPImageHandler
- All Implemented Interfaces:
ImageHandlerBase
- Direct Known Subclasses:
AbstractAFPImageHandlerRawStream
,AFPImageHandlerGraphics2D
,AFPImageHandlerRawJPEG
,AFPImageHandlerRenderedImage
A base abstract AFP image handler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AFPDataObjectInfo
Creates the data object information objectstatic AFPObjectAreaInfo
createObjectAreaInfo
(AFPPaintingState paintingState, Rectangle targetRect) Creates and returns anAFPObjectAreaInfo
instance for the placement of the image.static AFPResourceInfo
createResourceInformation
(String uri, Map foreignAttributes) Sets resource information on the data object info.generateDataObjectInfo
(AFPRendererImageInfo rendererImageInfo) Generates an intermediate AFPDataObjectInfo that is later used to construct the appropriate data object in the AFP DataStream.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.ImageHandlerBase
getPriority, getSupportedImageClass, getSupportedImageFlavors
-
Constructor Details
-
AFPImageHandler
public AFPImageHandler()
-
-
Method Details
-
generateDataObjectInfo
public AFPDataObjectInfo generateDataObjectInfo(AFPRendererImageInfo rendererImageInfo) throws IOException Generates an intermediate AFPDataObjectInfo that is later used to construct the appropriate data object in the AFP DataStream.- Parameters:
rendererImageInfo
- the renderer image info- Returns:
- a data object info object
- Throws:
IOException
- thrown if an I/O exception of some sort has occurred.
-
createResourceInformation
Sets resource information on the data object info.- Parameters:
uri
- the image's URI (or null if no URI is available)foreignAttributes
- a Map of foreign attributes (or null)- Returns:
- the resource information object
-
createObjectAreaInfo
public static AFPObjectAreaInfo createObjectAreaInfo(AFPPaintingState paintingState, Rectangle targetRect) Creates and returns anAFPObjectAreaInfo
instance for the placement of the image.- Parameters:
paintingState
- the painting statetargetRect
- the target rectangle in which to place the image (coordinates in mpt)- Returns:
- the newly created object area info instance
-
createDataObjectInfo
Creates the data object information object- Returns:
- the data object information object
-