Class PadRed

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

    public class PadRed
    extends AbstractRed
    This is an implementation of a Pad operation as a RenderedImage.
    • Constructor Detail

      • PadRed

        public PadRed​(CachableRed src,
                      java.awt.Rectangle bounds,
                      PadMode padMode,
                      java.awt.RenderingHints hints)
        Construct A Rendered Pad operation. If the pad is smaller than the original image size then this devolves to a Crop.
        Parameters:
        src - The image to pad/crop
        bounds - The bounds of the result (same coord system as src).
        padMode - The pad mode to use (currently ignored).
        hints - The hints to use for drawing 'pad' area.
    • Method Detail

      • copyData

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

        protected void handleZero​(java.awt.image.WritableRaster wr)
      • handleReplicate

        protected void handleReplicate​(java.awt.image.WritableRaster wr)
      • handleWrap

        protected void handleWrap​(java.awt.image.WritableRaster wr)
      • fixSampleModel

        protected static java.awt.image.SampleModel fixSampleModel​(CachableRed src,
                                                                   java.awt.Rectangle bounds)
        This function 'fixes' the source's sample model. right now it just ensures that the sample model isn't much larger than my width.