|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.jai.OperationDescriptorImpl
javax.media.jai.operator.ConstantDescriptor
public class ConstantDescriptor
An OperationDescriptor
describing the "Constant"
operation.
The Constant operation creates a multi-banded, tiled rendered
image, where all the pixels from the same band have a constant
value. The width and height of the image must be specified and
greater than 0. At least one constant must be supplied. The number
of bands of the image is determined by the number of constant pixel
values supplied in the "bandValues" parameter. The data type is
determined by the type of the constants; this means all elements of
the bandValues
array must be of the same type.
If the bandValues
array is a Short
array, then TYPE_USHORT
is used if all values are
non-negative; otherwise TYPE_SHORT
is used.
Name | Value |
---|---|
GlobalName | Constant |
LocalName | Constant |
Vendor | com.sun.media.jai |
Description | Creates an image with constant pixel values. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ConstantDescriptor.html |
Version | 1.0 |
arg0Desc | Image width in pixels. |
arg1Desc | Image height in pixels. |
arg2Desc | The constant pixel band values. |
Name | Class Type | Default Value |
---|---|---|
width | java.lang.Float | NO_PARAMETER_DEFAULT |
height | java.lang.Float | NO_PARAMETER_DEFAULT |
bandValues | java.lang.Number[] | NO_PARAMETER_DEFAULT |
OperationDescriptor
,
Serialized FormField Summary |
---|
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
---|
sourceNames |
Fields inherited from interface javax.media.jai.OperationDescriptor |
---|
NO_PARAMETER_DEFAULT |
Constructor Summary | |
---|---|
ConstantDescriptor()
Constructor. |
Method Summary | |
---|---|
static RenderedOp |
create(Float width,
Float height,
Number[] bandValues,
RenderingHints hints)
Creates an image with constant pixel values. |
static RenderableOp |
createRenderable(Float width,
Float height,
Number[] bandValues,
RenderingHints hints)
Creates an image with constant pixel values. |
protected boolean |
validateParameters(String modeName,
ParameterBlock args,
StringBuffer message)
Validates the input parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConstantDescriptor()
Method Detail |
---|
protected boolean validateParameters(String modeName, ParameterBlock args, StringBuffer message)
In addition to the standard checks performed by the superclass method, this method checks that "width" and "height" are greater than 0 (for rendered mode) and that "bandValues" has length at least 1.
validateParameters
in class OperationDescriptorImpl
OperationDescriptorImpl.validateArguments(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
,
ParameterListDescriptorImpl.isParameterValueValid(java.lang.String, java.lang.Object)
public static RenderedOp create(Float width, Float height, Number[] bandValues, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
width
- Image width in pixels.height
- Image height in pixels.bandValues
- The constant pixel band values.hints
- The RenderingHints
to use.
May be null
.
RenderedOp
destination.
IllegalArgumentException
- if width
is null
.
IllegalArgumentException
- if height
is null
.
IllegalArgumentException
- if bandValues
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static RenderableOp createRenderable(Float width, Float height, Number[] bandValues, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
width
- Image width in pixels.height
- Image height in pixels.bandValues
- The constant pixel band values.hints
- The RenderingHints
to use.
May be null
.
RenderableOp
destination.
IllegalArgumentException
- if width
is null
.
IllegalArgumentException
- if height
is null
.
IllegalArgumentException
- if bandValues
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |