public class PinchFilter extends TransformFilter
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, RGB_CLAMP, transformedSpace, WRAP, ZERO
Constructor and Description |
---|
PinchFilter() |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst) |
float |
getAmount()
Get the amount of pinch.
|
float |
getAngle()
Get the angle of twist.
|
java.awt.geom.Point2D |
getCentre()
Get the centre of the effect as a proportion of the image size.
|
float |
getCentreX()
Get the centre of the effect in the X direction as a proportion of the image size.
|
float |
getCentreY()
Get the centre of the effect in the Y direction as a proportion of the image size.
|
float |
getRadius()
Get the radius of the effect.
|
void |
setAmount(float amount)
Set the amount of pinch.
|
void |
setAngle(float angle)
Set the angle of twirl in radians. 0 means no distortion.
|
void |
setCentre(java.awt.geom.Point2D centre)
Set the centre of the effect as a proportion of the image size.
|
void |
setCentreX(float centreX)
Set the centre of the effect in the X direction as a proportion of the image size.
|
void |
setCentreY(float centreY)
Set the centre of the effect in the Y direction as a proportion of the image size.
|
void |
setRadius(float radius)
Set the radius of the effect.
|
java.lang.String |
toString() |
protected void |
transformInverse(int x,
int y,
float[] out)
Inverse transform a point.
|
filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
public void setAngle(float angle)
angle
- the angle of twirl. This is the angle by which pixels at the nearest edge of the image will move.getAngle()
public float getAngle()
setAngle(float)
public void setCentreX(float centreX)
centreX
- the centergetCentreX()
public float getCentreX()
setCentreX(float)
public void setCentreY(float centreY)
centreY
- the centergetCentreY()
public float getCentreY()
setCentreY(float)
public void setCentre(java.awt.geom.Point2D centre)
centre
- the centergetCentre()
public java.awt.geom.Point2D getCentre()
setCentre(java.awt.geom.Point2D)
public void setRadius(float radius)
radius
- the radius. The minimum value is 0.0, the maximum is 1.0getRadius()
public float getRadius()
setRadius(float)
public void setAmount(float amount)
amount
- the amount The minimum value is -1.0, the maximum is 1.0getAmount()
public float getAmount()
setAmount(float)
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
filter
in interface java.awt.image.BufferedImageOp
filter
in class TransformFilter
protected void transformInverse(int x, int y, float[] out)
TransformFilter
transformInverse
in class TransformFilter
x
- the X position of the pixel in the output imagey
- the Y position of the pixel in the output imageout
- the position of the pixel in the input imagepublic java.lang.String toString()
toString
in class java.lang.Object