Class TileRable8Bit

All Implemented Interfaces:
RenderableImage, Filter, FilterColorInterpolation, TileRable

public class TileRable8Bit extends AbstractColorInterpolationRable implements TileRable
8 bit TileRable implementation
  • Constructor Details

    • TileRable8Bit

      public TileRable8Bit(Filter source, Rectangle2D tiledRegion, Rectangle2D tileRegion, boolean overflow)
      Default constructor
  • Method Details

    • getTileRegion

      public Rectangle2D getTileRegion()
      Returns the tile region
      Specified by:
      getTileRegion in interface TileRable
    • setTileRegion

      public void setTileRegion(Rectangle2D tileRegion)
      Sets the tile region
      Specified by:
      setTileRegion in interface TileRable
    • getTiledRegion

      public Rectangle2D getTiledRegion()
      Returns the tiled region
      Specified by:
      getTiledRegion in interface TileRable
    • setTiledRegion

      public void setTiledRegion(Rectangle2D tiledRegion)
      Sets the tiled region
      Specified by:
      setTiledRegion in interface TileRable
    • isOverflow

      public boolean isOverflow()
      Returns the overflow strategy
      Specified by:
      isOverflow in interface TileRable
    • setOverflow

      public void setOverflow(boolean overflow)
      Sets the overflow strategy
      Specified by:
      setOverflow in interface TileRable
    • setSource

      public void setSource(Filter src)
      Sets the filter source
      Specified by:
      setSource in interface TileRable
    • getSource

      public Filter getSource()
      Return's the tile source
      Specified by:
      getSource in interface TileRable
    • getBounds2D

      public Rectangle2D getBounds2D()
      Returns this filter's bounds
      Specified by:
      getBounds2D in interface Filter
      Overrides:
      getBounds2D in class AbstractRable
    • createRendering

      public RenderedImage createRendering(RenderContext rc)
      Specified by:
      createRendering in interface RenderableImage
    • getActualTileBounds

      public Rectangle2D getActualTileBounds(Rectangle2D tiledRect)
    • createTile

      public RenderedImage createTile(RenderContext rc)
      Computes the tile to use for the tiling operation. The tile has its origin in the upper left corner of the tiled region. That tile is separated into 4 areas: top-left, top-right, bottom-left and bottom-right. Each of these areas is mapped to some input area from the source. If the source is smaller than the tiled area, then a single rendering is requested from the source. If the source's width or height is bigger than that of the tiled area, then separate renderings are requested from the source.