Class TranslateRed

  • All Implemented Interfaces:
    java.awt.image.RenderedImage, CachableRed

    public class TranslateRed
    extends AbstractRed
    This is a special case of an Affine that only contains integer translations, this allows it to do it's work by simply changing the coordinate system of the tiles.
    Version:
    $Id: TranslateRed.java 1733416 2016-03-03 07:07:13Z gadams $
    • Field Detail

      • deltaX

        protected int deltaX
      • deltaY

        protected int deltaY
    • Constructor Detail

      • TranslateRed

        public TranslateRed​(CachableRed cr,
                            int xloc,
                            int yloc)
        Construct an instance of TranslateRed
        Parameters:
        xloc - The new x coordinate of cr.getMinX().
        yloc - The new y coordinate of cr.getMinY().
    • Method Detail

      • getDeltaX

        public int getDeltaX()
        The delata translation in x (absolute loc is available from getMinX())
      • getDeltaY

        public int getDeltaY()
        The delata translation in y (absolute loc is available from getMinY())
      • getSource

        public CachableRed getSource()
        fetch the source image for this node.
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
        Specified by:
        getProperty in interface java.awt.image.RenderedImage
        Overrides:
        getProperty in class AbstractRed
      • getPropertyNames

        public java.lang.String[] getPropertyNames()
        Specified by:
        getPropertyNames in interface java.awt.image.RenderedImage
        Overrides:
        getPropertyNames in class AbstractRed
      • getTile

        public java.awt.image.Raster getTile​(int tileX,
                                             int tileY)
        Specified by:
        getTile in interface java.awt.image.RenderedImage
        Overrides:
        getTile in class AbstractRed
      • getData

        public java.awt.image.Raster getData()
        Specified by:
        getData in interface java.awt.image.RenderedImage
        Overrides:
        getData in class AbstractRed
      • getData

        public java.awt.image.Raster getData​(java.awt.Rectangle rect)
        Specified by:
        getData in interface java.awt.image.RenderedImage
        Overrides:
        getData in class AbstractRed
      • copyData

        public java.awt.image.WritableRaster copyData​(java.awt.image.WritableRaster wr)