public class AffineTransformOp extends java.lang.Object implements BufferedImageOp, RasterOp
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_BICUBIC |
static int |
TYPE_BILINEAR |
static int |
TYPE_NEAREST_NEIGHBOR |
| Constructor and Description |
|---|
AffineTransformOp(java.awt.geom.AffineTransform xform,
int interpolationType)
Construct AffineTransformOp with the given xform and interpolationType.
|
AffineTransformOp(java.awt.geom.AffineTransform xform,
java.awt.RenderingHints hints)
Construct AffineTransformOp with the given xform and rendering hints.
|
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
createCompatibleDestImage(BufferedImage src,
ColorModel destCM)
Creates a new BufferedImage with the size equal to that of the
transformed image and the correct number of bands.
|
WritableRaster |
createCompatibleDestRaster(Raster src)
Creates a new WritableRaster with the size equal to the transformed
source raster and correct number of bands .
|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst)
Transforms source image using transform specified at the constructor.
|
WritableRaster |
filter(Raster src,
WritableRaster dst)
Transforms source raster using transform specified at the constructor.
|
java.awt.geom.Rectangle2D |
getBounds2D(BufferedImage src)
Transforms source image using transform specified at the constructor and
returns bounds of the transformed image.
|
java.awt.geom.Rectangle2D |
getBounds2D(Raster src)
Returns bounds of the transformed raster.
|
int |
getInterpolationType()
Returns interpolation type used during transformations.
|
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D dstPt)
Returns location of the transformed source point.
|
java.awt.RenderingHints |
getRenderingHints()
Returns rendering hints that are used during transformation.
|
java.awt.geom.AffineTransform |
getTransform()
Returns transform used in transformation between source and destination
image.
|
public static final int TYPE_NEAREST_NEIGHBOR
public static final int TYPE_BILINEAR
public static final int TYPE_BICUBIC
public AffineTransformOp(java.awt.geom.AffineTransform xform, int interpolationType)
xform - AffineTransform that will applied to the source imageinterpolationType - type of interpolation usedImagingOpException - if the transform matrix is noninvertiblepublic AffineTransformOp(java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)
xform - AffineTransform that will applied to the source imagehints - rendering hints that will be used during transformationImagingOpException - if the transform matrix is noninvertiblepublic BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM)
createCompatibleDestImage in interface BufferedImageOpsrc - the source image.destCM - color model for the destination image (can be null).public WritableRaster createCompatibleDestRaster(Raster src)
createCompatibleDestRaster in interface RasterOpsrc - the source raster.RasterFormatException - if resulting width or height of raster is 0.public final BufferedImage filter(BufferedImage src, BufferedImage dst)
filter in interface BufferedImageOpsrc - source imagedst - destination imagejava.lang.IllegalArgumentException - if the source and destination image are
the samepublic final WritableRaster filter(Raster src, WritableRaster dst)
public final java.awt.geom.Rectangle2D getBounds2D(BufferedImage src)
getBounds2D in interface BufferedImageOpsrc - image to be transformedpublic final java.awt.geom.Rectangle2D getBounds2D(Raster src)
getBounds2D in interface RasterOpsrc - raster to be transformedpublic final int getInterpolationType()
public final java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)
getPoint2D in interface BufferedImageOpgetPoint2D in interface RasterOpsrcPt - point to be transformeddstPt - destination pointpublic final java.awt.RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpgetRenderingHints in interface RasterOppublic final java.awt.geom.AffineTransform getTransform()