javax.media.jai.operator
Class BorderDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.BorderDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class BorderDescriptor
- extends OperationDescriptorImpl
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:
OperationDescriptor
, Serialized Form
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
arePropertiesSupported,
getDefaultSourceClass,
getDestClass,
getDestClass,
getName,
getNumParameters,
getNumSources,
getParamClasses,
getParamDefaults,
getParamDefaultValue,
getParameterListDescriptor,
getParamMaxValue,
getParamMinValue,
getParamNames,
getPropertyGenerators,
getPropertyGenerators,
getRenderableDestClass,
getRenderableSourceClasses,
getResourceBundle,
getResources,
getSourceClasses,
getSourceClasses,
getSourceNames,
getSupportedModes,
isImmediate,
isModeSupported,
isRenderableSupported,
isRenderedSupported,
makeDefaultSourceClassList,
validateArguments,
validateArguments,
validateParameters,
validateParameters,
validateRenderableArguments,
validateRenderableSources,
validateSources,
validateSources |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BorderDescriptor
public BorderDescriptor()
- Constructor.
getInvalidRegion
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.
- Overrides:
- getInvalidRegion in class OperationDescriptorImpl
- Parameters:
modeName
- The name of the mode.oldParamBlock
- The previous sources and parameters.oldHints
- The previous hints.newParamBlock
- The current sources and parameters.newHints
- The current hints.node
- The affected node in the processing chain (ignored).- Returns:
- The region over which the data of two renderings of this
operation may be expected to be invalid or
null
if there is no common region of validity.
A non-null
empty region indicates that the
operation would produce identical data over the bounds of the
old rendering although perhaps not over the area occupied by
the tiles of the old rendering. - Throws:
- IllegalArgumentException - if
modeName
is null
or if the operation requires either
sources or parameters and either oldParamBlock
or newParamBlock
is null
.- IllegalArgumentException - if
oldParamBlock
or
newParamBlock
do not contain sufficient sources
or parameters for the operation in question.