// Get BorderExtender from renderHints if any.
BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);
MaxFilterShape maskType =
(MaxFilterShape)paramBlock.getObjectParameter(0);
int maskSize = paramBlock.getIntParameter(1);
RenderedImage ri = paramBlock.getRenderedSource(0);
if(maskType.equals(MaxFilterDescriptor.MAX_MASK_SQUARE)) {
return new MaxFilterSquareOpImage(ri,
extender,
renderHints,
layout,
maskSize);
} else if(maskType.equals(MaxFilterDescriptor.MAX_MASK_PLUS)) {
return new MaxFilterPlusOpImage(ri,
extender,
renderHints,
layout,
maskSize);
} else if(maskType.equals(MaxFilterDescriptor.MAX_MASK_X)) {
return new MaxFilterXOpImage(ri,
extender,
renderHints,
layout,
maskSize);
} else if(maskType.equals(MaxFilterDescriptor.MAX_MASK_SQUARE_SEPARABLE)) {
return new MaxFilterSeparableOpImage(ri,
extender,
renderHints,
layout,
maskSize);