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
public abstract class AFPImageHandler extends java.lang.Object implements ImageHandlerBase
A base abstract AFP image handler
-
-
Constructor Summary
Constructors Constructor Description AFPImageHandler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AFPDataObjectInfo
createDataObjectInfo()
Creates the data object information objectstatic AFPObjectAreaInfo
createObjectAreaInfo(AFPPaintingState paintingState, java.awt.Rectangle targetRect)
Creates and returns anAFPObjectAreaInfo
instance for the placement of the image.static AFPResourceInfo
createResourceInformation(java.lang.String uri, java.util.Map foreignAttributes)
Sets resource information on the data object info.AFPDataObjectInfo
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
-
-
-
-
Method Detail
-
generateDataObjectInfo
public AFPDataObjectInfo generateDataObjectInfo(AFPRendererImageInfo rendererImageInfo) throws java.io.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:
java.io.IOException
- thrown if an I/O exception of some sort has occurred.
-
createResourceInformation
public static AFPResourceInfo createResourceInformation(java.lang.String uri, java.util.Map foreignAttributes)
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, java.awt.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
protected abstract AFPDataObjectInfo createDataObjectInfo()
Creates the data object information object- Returns:
- the data object information object
-
-