org.apache.xmlgraphics.image.rendered

## Interface CachableRed

- All Superinterfaces:
    java.awt.image.RenderedImage
  All Known Implementing Classes:
    AbstractRed, Any2LsRGBRed, Any2sRGBRed, BufferedImageCachableRed, FormatRed, PNGRed, RenderedImageCachableRed, TIFFImage

      public interface CachableRed
      extends java.awt.image.RenderedImage

  This provides a number of extra methods that enable a system to better analyse the dependencies between nodes in a render graph.
  Version:
    $Id: CachableRed.java 1732018 2016-02-24 04:51:06Z gadams $ Originally authored by Thomas DeWeese.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Rectangle` | `getBounds()` Returns the bounds of the current image.
    `java.awt.Shape` | `getDependencyRegion(int srcIndex, java.awt.Rectangle outputRgn)` Returns the region of input data is is required to generate outputRgn.
    `java.awt.Shape` | `getDirtyRegion(int srcIndex, java.awt.Rectangle inputRgn)` This calculates the region of output that is affected by a change in a region of input.

    - ### Methods inherited from interface java.awt.image.RenderedImage

      `copyData, getColorModel, getData, getData, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth`

- - ### Method Detail

    - #### getBounds

          java.awt.Rectangle getBounds()

      Returns the bounds of the current image. This should be 'in sync' with getMinX, getMinY, getWidth, getHeight

    - #### getDependencyRegion

          java.awt.Shape getDependencyRegion(int srcIndex,
                                             java.awt.Rectangle outputRgn)

      Returns the region of input data is is required to generate outputRgn.
      Parameters:
        `srcIndex` - The source to do the dependency calculation for.
        `outputRgn` - The region of output you are interested in generating dependencies for. The is given in the output pixel coordiate system for this node.
      Returns:
        The region of input required. This is in the output pixel coordinate system for the source indicated by srcIndex.

    - #### getDirtyRegion

          java.awt.Shape getDirtyRegion(int srcIndex,
                                        java.awt.Rectangle inputRgn)

      This calculates the region of output that is affected by a change in a region of input.
      Parameters:
        `srcIndex` - The input that inputRgn reflects changes in.
        `inputRgn` - the region of input that has changed, used to calculate the returned shape. This is given in the pixel coordinate system of the source indicated by srcIndex.
      Returns:
        The region of output that would be invalid given a change to inputRgn of the source selected by srcIndex. this is in the output pixel coordinate system of this node.

Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.