Raster
to 2D coordinates
in the destination image or Raster
.
The type of interpolation that is used is specified through a constructor,
either by a RenderingHints
object or by one of the integer
interpolation types defined in this class.
If a RenderingHints
object is specified in the constructor, the
interpolation hint and the rendering quality hint are used to set
the interpolation type for this operation. The color rendering hint
and the dithering hint can be used when color conversion is required.
Note that the following constraints have to be met:
Raster
objects, the number of bands in the source must
be equal to the number of bands in the destination.
AffineTransform
, BufferedImageFilter
, java.awt.RenderingHints#KEY_INTERPOLATION
, java.awt.RenderingHints#KEY_RENDERING
, java.awt.RenderingHints#KEY_COLOR_RENDERING
, java.awt.RenderingHints#KEY_DITHERING
Modifier and Type | Field and Description |
---|---|
pack-priv RenderingHints | |
pack-priv int | |
public static final int | TYPE_BICUBIC
Bicubic interpolation type. |
public static final int | TYPE_BILINEAR
Bilinear interpolation type. |
public static final int | TYPE_NEAREST_NEIGHBOR
Nearest-neighbor interpolation type. |
private AffineTransform |
Access | Constructor and Description |
---|---|
public | AffineTransformOp(AffineTransform
The xform, RenderingHints AffineTransform to use for the
operation.The hints)RenderingHints object used to specify
the interpolation type for the operation.Constructs an |
public | AffineTransformOp(AffineTransform
The xform, int AffineTransform to use for the operation.One of the integer
interpolation type constants defined by this class:
interpolationType)TYPE_NEAREST_NEIGHBOR ,
TYPE_BILINEAR ,
TYPE_BICUBIC .Constructs an |
Modifier and Type | Method and Description |
---|---|
public BufferedImage | Returns: The zeroed destination image.The src, ColorModel BufferedImage to be transformed.ColorModel of the destination. If null,
an appropriate ColorModel is used.Implements java. |
public WritableRaster | Returns: The zeroed destinationRaster .The src)Raster to be transformed.Implements java. Raster with the correct size
and number of bands.
|
public final BufferedImage | Returns: The filteredBufferedImage .The src, BufferedImage BufferedImage to transform.The dst)BufferedImage in which to store the results
of the transformation.Implements java. BufferedImage and stores the results
in the destination BufferedImage .
|
public final WritableRaster | Returns: The transformedRaster .The src, WritableRaster Raster to transform.The dst)Raster in which to store the results of the
transformation.Implements java. Raster and stores the results in
the destination Raster .
|
public final Rectangle2D | Returns: TheRectangle2D representing the destination's
bounding box.The src)BufferedImage to be transformed.Implements java. |
public final Rectangle2D | Returns: TheRectangle2D representing the destination's
bounding box.The src)Raster to be transformed.Implements java. |
public final int | Returns: the interpolation type.Returns the interpolation type used by this op. |
public final Point2D | Returns: ThePoint2D in the destination that corresponds to
the specified point in the source.The srcPt, Point2D Point2D that represents the source
point.The dstPt)Point2D in which to store the result.Implements java. |
public final RenderingHints | Returns: TheRenderingHints object associated with this op.Implements java. |
public final AffineTransform | Returns: TheAffineTransform associated with this op.Returns the affine transform used by this transform operation. |
pack-priv void |
hints | back to summary |
---|---|
pack-priv RenderingHints hints |
interpolationType | back to summary |
---|---|
pack-priv int interpolationType |
TYPE_BICUBIC | back to summary |
---|---|
public static final int TYPE_BICUBIC Bicubic interpolation type. |
TYPE_BILINEAR | back to summary |
---|---|
public static final int TYPE_BILINEAR Bilinear interpolation type. |
TYPE_NEAREST_NEIGHBOR | back to summary |
---|---|
public static final int TYPE_NEAREST_NEIGHBOR Nearest-neighbor interpolation type. |
xform | back to summary |
---|---|
private AffineTransform xform |
AffineTransformOp | back to summary |
---|---|
public AffineTransformOp(AffineTransform xform, RenderingHints hints) Constructs an
|
AffineTransformOp | back to summary |
---|---|
public AffineTransformOp(AffineTransform xform, int interpolationType) Constructs an
|
createCompatibleDestImage | back to summary |
---|---|
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM) Implements java. Creates a zeroed destination image with the correct size and number of
bands. A
If
|
createCompatibleDestRaster | back to summary |
---|---|
public WritableRaster createCompatibleDestRaster(Raster src) Implements java. Creates a zeroed destination
|
filter | back to summary |
---|---|
public final BufferedImage filter(BufferedImage src, BufferedImage dst) Implements java. Transforms the source
The coordinates of the rectangle returned by
An
|
filter | back to summary |
---|---|
public final WritableRaster filter(Raster src, WritableRaster dst) Implements java. Transforms the source
If the destination
The coordinates of the rectangle returned by
|
getBounds2D | back to summary |
---|---|
public final Rectangle2D getBounds2D(BufferedImage src) Implements java. Returns the bounding box of the transformed destination. The rectangle returned is the actual bounding box of the transformed points. The coordinates of the upper-left corner of the returned rectangle might not be (0, 0).
|
getBounds2D | back to summary |
---|---|
public final Rectangle2D getBounds2D(Raster src) Implements java. Returns the bounding box of the transformed destination. The rectangle returned will be the actual bounding box of the transformed points. The coordinates of the upper-left corner of the returned rectangle might not be (0, 0).
|
getInterpolationType | back to summary |
---|---|
public final int getInterpolationType() Returns the interpolation type used by this op.
|
getPoint2D | back to summary |
---|---|
public final Point2D getPoint2D(Point2D srcPt, Point2D dstPt) Implements java. Returns the location of the corresponding destination point given a
point in the source. If |
getRenderingHints | back to summary |
---|---|
public final RenderingHints getRenderingHints() Implements java. Returns the rendering hints used by this transform operation.
|
getTransform | back to summary |
---|---|
public final AffineTransform getTransform() Returns the affine transform used by this transform operation.
|
validateTransform | back to summary |
---|---|
pack-priv void validateTransform(AffineTransform xform) |