Exemplo n.º 1
0
  @Override
  public DirtyRegionContainer getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool) {
    Effect di = getDefaultedInput(0, defaultInput);
    DirtyRegionContainer drc = di.getDirtyRegions(defaultInput, regionPool);

    drc.grow(state.getHPad(), state.getVPad());

    return drc;
  }
Exemplo n.º 2
0
 @Override
 public BaseBounds getBounds(BaseTransform transform, Effect defaultInput) {
   BaseBounds r = super.getBounds(null, defaultInput);
   int hpad = state.getHPad();
   int vpad = state.getVPad();
   BaseBounds ret = new RectBounds(r.getMinX(), r.getMinY(), r.getMaxX(), r.getMaxY());
   ((RectBounds) ret).grow(hpad, vpad);
   return transformBounds(transform, ret);
 }
Exemplo n.º 3
0
 @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;
 }
Exemplo n.º 4
0
 @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;
 }