public class ResizeOp extends AbstractBufferedImageOp
The RenderingHints
defined at construction time are used if the
destination color model has to be adapted for the filter operation.
Note that the following constraints have to be met
source
and destination
must be different.
Constructor and Description |
---|
ResizeOp(double scale)
Creates a new
ResizeOp with no rendering hints and the same
horizontal and vertical scale factor. |
ResizeOp(double scaleX,
double scaleY)
Creates a new
ResizeOp with no rendering hints. |
ResizeOp(double scaleX,
double scaleY,
java.awt.RenderingHints hints)
Creates a new
ResizeOp object. |
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBounds2D(java.awt.image.BufferedImage src)
Returns the bounding box of the filtered destination image.
|
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D srcPt,
java.awt.geom.Point2D dstPt)
Returns the location of the destination point given a point in the source
image.
|
boolean |
isFast() |
void |
setFast(boolean fast) |
createCompatibleDestImage, filter, getRenderingHints
public ResizeOp(double scaleX, double scaleY, java.awt.RenderingHints hints)
ResizeOp
object.scaleX
- The horizontal scale factorscaleY
- The vertical scale factorhints
- The rendering hints. May be null
.public ResizeOp(double scaleX, double scaleY)
ResizeOp
with no rendering hints.scaleX
- The horizontal scale factorscaleY
- The vertical scale factorpublic ResizeOp(double scale)
ResizeOp
with no rendering hints and the same
horizontal and vertical scale factor.scale
- The scale factor used for both horizontal and vertical
scaling.public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
getBounds2D
in interface java.awt.image.BufferedImageOp
getBounds2D
in class AbstractBufferedImageOp
public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)
getPoint2D
in interface java.awt.image.BufferedImageOp
getPoint2D
in class AbstractBufferedImageOp
public boolean isFast()
public void setFast(boolean fast)
Copyright © 2010 - 2020 Adobe. All Rights Reserved