|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.OperationDescriptorImpl | +--javax.media.jai.operator.RotateDescriptor
An OperationDescriptor
describing the "Rotate" operation.
The "Rotate" operation rotates an image about a given point by a given angle, specified in radians. The origin defaults to (0, 0).
The parameter, "backgroundValues", is defined to
fill the background with the user-specified background
values. These background values will be translated into background
colors by the ColorModel
when the image is displayed.
With the default value, {0.0}
, of this parameter,
the background pixels are filled with 0s. If the provided array
length is smaller than the number of bands, the first element of
the provided array is used for all the bands. If the provided values
are out of the data range of the destination image, they will be clamped
into the proper range.
It may be noted that the minX, minY, width and height hints as
specified through the JAI.KEY_IMAGE_LAYOUT
hint in the
RenderingHints
object are not honored, as this operator
calculates the destination image bounds itself. The other
ImageLayout
hints, like tileWidth and tileHeight,
however are honored.
It should be noted that this operation automatically adds a
value of Boolean.TRUE
for the
JAI.KEY_REPLACE_INDEX_COLOR_MODEL
to the given
configuration
so that the operation is performed
on the pixel values instead of being performed on the indices into
the color map if the source(s) have an IndexColorModel
.
This addition will take place only if a value for the
JAI.KEY_REPLACE_INDEX_COLOR_MODEL
has not already been
provided by the user. Note that the configuration
Map
is cloned before the new hint is added to it. The operation can be
smart about the value of the JAI.KEY_REPLACE_INDEX_COLOR_MODEL
RenderingHints
, i.e. while the default value for the
JAI.KEY_REPLACE_INDEX_COLOR_MODEL
is
Boolean.TRUE
, in some cases the operator could set the
default.
"Rotate" defines a PropertyGenerator that performs an
identical transformation on the "ROI" property of the source image,
which can be retrieved by calling the getProperty
method with "ROI" as the property name.
Name | Value |
---|---|
GlobalName | Rotate |
LocalName | Rotate |
Vendor | com.sun.media.jai |
Description | Rotate an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/RotateDescriptor.html |
Version | 1.0 |
arg0Desc | The X origin to rotate about. |
arg1Desc | The Y origin to rotate about. |
arg2Desc | The rotation angle in radians. |
arg3Desc | The interpolation method. |
Name | Class Type | Default Value |
---|---|---|
xOrigin | java.lang.Float | 0.0F |
yOrigin | java.lang.Float | 0.0F |
angle | java.lang.Float | 0.0F |
interpolation | javax.media.jai.Interpolation | InterpolationNearest |
backgroundValues | double[] | {0.0} |
Interpolation
,
OperationDescriptor
, Serialized FormFields inherited from class javax.media.jai.OperationDescriptorImpl |
resources, sourceNames, supportedModes |
Fields inherited from interface javax.media.jai.OperationDescriptor |
NO_PARAMETER_DEFAULT |
Constructor Summary | |
RotateDescriptor()
Constructor. |
Method Summary | |
static RenderedOp |
create(RenderedImage source0,
Float xOrigin,
Float yOrigin,
Float angle,
Interpolation interpolation,
double[] backgroundValues,
RenderingHints hints)
Rotates an image. |
static RenderableOp |
createRenderable(RenderableImage source0,
Float xOrigin,
Float yOrigin,
Float angle,
Interpolation interpolation,
double[] backgroundValues,
RenderingHints hints)
Rotates an image. |
PropertyGenerator[] |
getPropertyGenerators()
Returns an array of PropertyGenerators implementing
property inheritance for the "Rotate" operation. |
boolean |
isRenderableSupported()
Returns true since renderable operation is supported. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RotateDescriptor()
Method Detail |
public boolean isRenderableSupported()
true
since renderable operation is supported.isRenderableSupported
in class OperationDescriptorImpl
javax.media.jai.OperationDescriptorImpl
OperationDescriptorImpl.isModeSupported(java.lang.String)
public PropertyGenerator[] getPropertyGenerators()
PropertyGenerators
implementing
property inheritance for the "Rotate" operation.getPropertyGenerators
in class OperationDescriptorImpl
public static RenderedOp create(RenderedImage source0, Float xOrigin, Float yOrigin, Float angle, Interpolation interpolation, double[] backgroundValues, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.xOrigin
- The X origin to rotate about.
May be null
.yOrigin
- The Y origin to rotate about.
May be null
.angle
- The rotation angle in radians.
May be null
.interpolation
- The interpolation method.
May be null
.backgroundValues
- The user-specified background values.
May be null
.hints
- The RenderingHints
to use.
May be null
.RenderedOp
destination.IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static RenderableOp createRenderable(RenderableImage source0, Float xOrigin, Float yOrigin, Float angle, Interpolation interpolation, double[] backgroundValues, RenderingHints hints)
Creates a ParameterBlockJAI
from all
supplied arguments except hints
and invokes
JAI.createRenderable(String,ParameterBlock,RenderingHints)
.
source0
- RenderableImage
source 0.xOrigin
- The X origin to rotate about.
May be null
.yOrigin
- The Y origin to rotate about.
May be null
.angle
- The rotation angle in radians.
May be null
.interpolation
- The interpolation method.
May be null
.backgroundValues
- The user-specified background values.
May be null
.hints
- The RenderingHints
to use.
May be null
.RenderableOp
destination.IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderableOp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |