|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.image.AffineTransformOp
public class AffineTransformOp
AffineTransformOp performs matrix-based transformations (translations, scales, flips, rotations, and shears). If interpolation is required, nearest neighbour, bilinear, and bicubic methods are available.
Field Summary | |
---|---|
static int |
TYPE_BICUBIC
|
static int |
TYPE_BILINEAR
|
static int |
TYPE_NEAREST_NEIGHBOR
|
Constructor Summary | |
---|---|
AffineTransformOp(AffineTransform xform,
int interpolationType)
Construct AffineTransformOp with the given xform and interpolationType. |
|
AffineTransformOp(AffineTransform xform,
RenderingHints hints)
Construct AffineTransformOp with the given xform and rendering hints. |
Method Summary | |
---|---|
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. |
Rectangle2D |
getBounds2D(BufferedImage src)
Transforms source image using transform specified at the constructor and returns bounds of the transformed image. |
Rectangle2D |
getBounds2D(Raster src)
Returns bounds of the transformed raster. |
int |
getInterpolationType()
Returns interpolation type used during transformations. |
Point2D |
getPoint2D(Point2D srcPt,
Point2D dstPt)
Returns location of the transformed source point. |
RenderingHints |
getRenderingHints()
Returns rendering hints that are used during transformation. |
AffineTransform |
getTransform()
Returns transform used in transformation between source and destination image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_NEAREST_NEIGHBOR
public static final int TYPE_BILINEAR
public static final int TYPE_BICUBIC
Constructor Detail |
---|
public AffineTransformOp(AffineTransform xform, int interpolationType)
xform
- AffineTransform that will applied to the source imageinterpolationType
- type of interpolation used
ImagingOpException
- if the transform matrix is noninvertiblepublic AffineTransformOp(AffineTransform xform, RenderingHints hints)
xform
- AffineTransform that will applied to the source imagehints
- rendering hints that will be used during transformation
ImagingOpException
- if the transform matrix is noninvertibleMethod Detail |
---|
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM)
createCompatibleDestImage
in interface BufferedImageOp
src
- the source image.destCM
- color model for the destination image (can be null).
public WritableRaster createCompatibleDestRaster(Raster src)
createCompatibleDestRaster
in interface RasterOp
src
- the source raster.
RasterFormatException
- if resulting width or height of raster is 0.public final BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
src
- source imagedst
- destination image
IllegalArgumentException
- if the source and destination image are
the samepublic final WritableRaster filter(Raster src, WritableRaster dst)
filter
in interface RasterOp
src
- source rasterdst
- destination raster
IllegalArgumentException
- if the source and destination are not
compatiblepublic final Rectangle2D getBounds2D(BufferedImage src)
getBounds2D
in interface BufferedImageOp
src
- image to be transformed
public final Rectangle2D getBounds2D(Raster src)
getBounds2D
in interface RasterOp
src
- raster to be transformed
public final int getInterpolationType()
public final Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
getPoint2D
in interface BufferedImageOp
getPoint2D
in interface RasterOp
srcPt
- point to be transformeddstPt
- destination point
public final RenderingHints getRenderingHints()
getRenderingHints
in interface BufferedImageOp
getRenderingHints
in interface RasterOp
public final AffineTransform getTransform()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |