|
|||||||||
| 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 noninvertible
public 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 noninvertible| Method Detail |
|---|
public 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 image
IllegalArgumentException - if the source and destination image are
the same
public final WritableRaster filter(Raster src,
WritableRaster dst)
filter in interface RasterOpsrc - source rasterdst - destination raster
IllegalArgumentException - if the source and destination are not
compatiblepublic final Rectangle2D getBounds2D(BufferedImage src)
getBounds2D in interface BufferedImageOpsrc - image to be transformed
public final Rectangle2D getBounds2D(Raster src)
getBounds2D in interface RasterOpsrc - raster to be transformed
public final int getInterpolationType()
public final Point2D getPoint2D(Point2D srcPt,
Point2D dstPt)
getPoint2D in interface BufferedImageOpgetPoint2D in interface RasterOpsrcPt - point to be transformeddstPt - destination point
public final RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpgetRenderingHints in interface RasterOppublic final AffineTransform getTransform()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||