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 Object
      implements ImageHandlerBase

  A base abstract AFP image handler

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AFPImageHandler()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract AFPDataObjectInfo` | `createDataObjectInfo()` Creates the data object information object
    `static AFPObjectAreaInfo` | `createObjectAreaInfo(AFPPaintingState paintingState, Rectangle targetRect)` Creates and returns an `AFPObjectAreaInfo` instance for the placement of the image.
    `static AFPResourceInfo` | `createResourceInformation(String uri, 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`

- - ### Constructor Detail

    - #### AFPImageHandler

          public AFPImageHandler()

  - ### Method Detail

    - #### 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

          public static AFPResourceInfo createResourceInformation(String uri,
                                                                  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,
                                                               Rectangle targetRect)

      Creates and returns an `AFPObjectAreaInfo` instance for the placement of the image.
      Parameters:
        `paintingState` - the painting state
        `targetRect` - 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

Copyright © 2023 Apache Software Foundation. All rights reserved.