| java.lang.Object javax.media.jai.OperationDescriptorImpl javax.media.jai.operator.BorderDescriptor
BorderDescriptor | public class BorderDescriptor extends OperationDescriptorImpl (Code) | | An OperationDescriptor describing the "Border" operation.
The Border operation adds a border around a rendered image. The
size of the border is specified in pixels by the left, right, top,
and bottom padding parameters, corresponding to the four sides of
the source image. These paddings may not be less than 0.
The pixel values of the added border area will be set according to
the algorithm of the BorderExtender passed as a parameter.
The BorderExtender s provide the ability to extend the
border by:
- filling it with zeros (
BorderExtenderZero );
- filling it with constants (
BorderExtenderConstant );
- copying the edge and corner pixels (
BorderExtenderCopy );
- reflecting about the edges of the image
(
BorderExtenderReflect ); or,
- "wrapping" the image plane toroidally, that is, joining opposite
edges of the image (
BorderExtenderWrap ).
Resource List
Name | Value |
GlobalName | Border |
LocalName | Border |
Vendor | com.sun.media.jai |
Description | Adds a border around an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/BorderDescriptor.html |
Version | 1.0 |
arg0Desc | The image's left padding. |
arg1Desc | The image's right padding. |
arg2Desc | The image's top padding. |
arg3Desc | The image's bottom padding. |
arg4Desc | The border extender. |
Parameter List
Name | Class Type |
Default Value |
leftPad | java.lang.Integer |
0 |
rightPad | java.lang.Integer |
0 |
topPad | java.lang.Integer |
0 |
bottomPad | java.lang.Integer |
0 |
type | javax.media.jai.BorderExtender |
javax.media.jai.BorderExtenderZero |
See Also: javax.media.jai.OperationDescriptor |
Method Summary | |
public static RenderedOp | create(RenderedImage source0, Integer leftPad, Integer rightPad, Integer topPad, Integer bottomPad, BorderExtender type, RenderingHints hints) Adds a border around an image.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderedOp Parameters: source0 - RenderedImage source 0. Parameters: leftPad - The image's left padding.May be null . Parameters: rightPad - The image's right padding.May be null . Parameters: topPad - The image's top padding.May be null . Parameters: bottomPad - The image's bottom padding.May be null . Parameters: type - The border type.May be null . Parameters: hints - The RenderingHints to use.May be null . | public Object | getInvalidRegion(String modeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node) Calculates the region over which two distinct renderings
of the "Border" operation may be expected to differ.
The operation returns a Shape or null
in the rendered mode and null in all other modes.
Parameters: modeName - The name of the mode. Parameters: oldParamBlock - The previous sources and parameters. Parameters: oldHints - The previous hints. Parameters: newParamBlock - The current sources and parameters. Parameters: newHints - The current hints. Parameters: node - The affected node in the processing chain (ignored). |
BorderDescriptor | public BorderDescriptor()(Code) | | Constructor.
|
create | public static RenderedOp create(RenderedImage source0, Integer leftPad, Integer rightPad, Integer topPad, Integer bottomPad, BorderExtender type, RenderingHints hints)(Code) | | Adds a border around an image.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderedOp Parameters: source0 - RenderedImage source 0. Parameters: leftPad - The image's left padding.May be null . Parameters: rightPad - The image's right padding.May be null . Parameters: topPad - The image's top padding.May be null . Parameters: bottomPad - The image's bottom padding.May be null . Parameters: type - The border type.May be null . Parameters: hints - The RenderingHints to use.May be null . The RenderedOp destination. throws: IllegalArgumentException - if source0 is null . |
getInvalidRegion | public Object getInvalidRegion(String modeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)(Code) | | Calculates the region over which two distinct renderings
of the "Border" operation may be expected to differ.
The operation returns a Shape or null
in the rendered mode and null in all other modes.
Parameters: modeName - The name of the mode. Parameters: oldParamBlock - The previous sources and parameters. Parameters: oldHints - The previous hints. Parameters: newParamBlock - The current sources and parameters. Parameters: newHints - The current hints. Parameters: node - The affected node in the processing chain (ignored). The region over which the data of two renderings of thisoperation may be expected to be invalid or null if there is no common region of validity.A non-null empty region indicates that theoperation would produce identical data over the bounds of theold rendering although perhaps not over the area occupied bythe tiles of the old rendering. throws: IllegalArgumentException - if modeName is null or if the operation requires eithersources or parameters and either oldParamBlock or newParamBlock is null . throws: IllegalArgumentException - if oldParamBlock ornewParamBlock do not contain sufficient sourcesor parameters for the operation in question. |
Methods inherited from javax.media.jai.OperationDescriptorImpl | public boolean arePropertiesSupported()(Code)(Java Doc) protected static Class getDefaultSourceClass(String modeName)(Code)(Java Doc) public Class getDestClass(String modeName)(Code)(Java Doc) public Class getDestClass()(Code)(Java Doc) public Object getInvalidRegion(String modeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)(Code)(Java Doc) public String getName()(Code)(Java Doc) public int getNumParameters()(Code)(Java Doc) public int getNumSources()(Code)(Java Doc) public Class[] getParamClasses()(Code)(Java Doc) public Object getParamDefaultValue(int index)(Code)(Java Doc) public Object[] getParamDefaults()(Code)(Java Doc) public Number getParamMaxValue(int index)(Code)(Java Doc) public Number getParamMinValue(int index)(Code)(Java Doc) public String[] getParamNames()(Code)(Java Doc) public ParameterListDescriptor getParameterListDescriptor(String modeName)(Code)(Java Doc) public PropertyGenerator[] getPropertyGenerators(String modeName)(Code)(Java Doc) public PropertyGenerator[] getPropertyGenerators()(Code)(Java Doc) public Class getRenderableDestClass()(Code)(Java Doc) public Class[] getRenderableSourceClasses()(Code)(Java Doc) public ResourceBundle getResourceBundle(Locale locale)(Code)(Java Doc) public String[][] getResources(Locale locale)(Code)(Java Doc) public Class[] getSourceClasses(String modeName)(Code)(Java Doc) public Class[] getSourceClasses()(Code)(Java Doc) public String[] getSourceNames()(Code)(Java Doc) public String[] getSupportedModes()(Code)(Java Doc) public boolean isImmediate()(Code)(Java Doc) public boolean isModeSupported(String modeName)(Code)(Java Doc) public boolean isRenderableSupported()(Code)(Java Doc) public boolean isRenderedSupported()(Code)(Java Doc) protected static Class[][] makeDefaultSourceClassList(String[] supportedModes, int numSources)(Code)(Java Doc) public boolean validateArguments(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) public boolean validateArguments(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateParameters(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateParameters(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) public boolean validateRenderableArguments(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateRenderableSources(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateSources(ParameterBlock args, StringBuffer msg)(Code)(Java Doc)
|
|
|