@Override public Rectangle getResultBounds( BaseTransform transform, Rectangle outputClip, ImageData... inputDatas) { Rectangle r = super.getResultBounds(transform, outputClip, inputDatas); int hpad = state.getHPad(); int vpad = state.getVPad(); Rectangle ret = new Rectangle(r); ret.grow(hpad, vpad); return ret; }
@Override protected Rectangle getInputClip(int inputIndex, BaseTransform transform, Rectangle outputClip) { // A blur needs as much "fringe" data from its input as it creates // around its output so we use the same expansion as is used in the // result bounds. if (outputClip != null) { int hpad = state.getHPad(); int vpad = state.getVPad(); if ((hpad | vpad) != 0) { outputClip = new Rectangle(outputClip); outputClip.grow(hpad, vpad); } } return outputClip; }