Package com.jhlabs.image
Class FeedbackFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.FeedbackFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp,java.lang.Cloneable
public class FeedbackFilter extends AbstractBufferedImageOp
A filter which priduces a video feedback effect by repeated transformations.
-
-
Constructor Summary
Constructors Constructor Description FeedbackFilter()Construct a FeedbackFilter.FeedbackFilter(float distance, float angle, float rotation, float zoom)Construct a FeedbackFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagefilter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)floatgetAngle()Returns the angle of each iteration.java.awt.geom.Point2DgetCentre()Get the centre of the effect as a proportion of the image size.floatgetCentreX()Get the centre of the effect in the X direction as a proportion of the image size.floatgetCentreY()Get the centre of the effect in the Y direction as a proportion of the image size.floatgetDistance()Get the distance to move on each iteration.floatgetEndAlpha()Get the alpha value at the last iteration.intgetIterations()Get the number of iterations.floatgetRotation()Returns the amount of rotation on each iteration.floatgetStartAlpha()Get the alpha value at the first iteration.floatgetZoom()Returns the amount to scale on each iteration.voidsetAngle(float angle)Specifies the angle of each iteration.voidsetCentre(java.awt.geom.Point2D centre)Set the centre of the effect as a proportion of the image size.voidsetCentreX(float centreX)Set the centre of the effect in the X direction as a proportion of the image size.voidsetCentreY(float centreY)Set the centre of the effect in the Y direction as a proportion of the image size.voidsetDistance(float distance)Specifies the distance to move on each iteration.voidsetEndAlpha(float endAlpha)Set the alpha value at the last iteration.voidsetIterations(int iterations)Set the number of iterations.voidsetRotation(float rotation)Specifies the amount of rotation on each iteration.voidsetStartAlpha(float startAlpha)Set the alpha value at the first iteration.voidsetZoom(float zoom)Specifies the amount to scale on each iteration.java.lang.StringtoString()-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Constructor Detail
-
FeedbackFilter
public FeedbackFilter()
Construct a FeedbackFilter.
-
FeedbackFilter
public FeedbackFilter(float distance, float angle, float rotation, float zoom)Construct a FeedbackFilter.- Parameters:
distance- the distance to move on each iterationangle- the angle to move on each iterationrotation- the amount to rotate on each iterationzoom- the amount to scale on each iteration
-
-
Method Detail
-
setAngle
public void setAngle(float angle)
Specifies the angle of each iteration.- Parameters:
angle- the angle of each iteration.- See Also:
getAngle()
-
getAngle
public float getAngle()
Returns the angle of each iteration.- Returns:
- the angle of each iteration.
- See Also:
setAngle(float)
-
setDistance
public void setDistance(float distance)
Specifies the distance to move on each iteration.- Parameters:
distance- the distance- See Also:
getDistance()
-
getDistance
public float getDistance()
Get the distance to move on each iteration.- Returns:
- the distance
- See Also:
setDistance(float)
-
setRotation
public void setRotation(float rotation)
Specifies the amount of rotation on each iteration.- Parameters:
rotation- the angle of rotation- See Also:
getRotation()
-
getRotation
public float getRotation()
Returns the amount of rotation on each iteration.- Returns:
- the angle of rotation
- See Also:
setRotation(float)
-
setZoom
public void setZoom(float zoom)
Specifies the amount to scale on each iteration.- Parameters:
zoom- the zoom factor- See Also:
getZoom()
-
getZoom
public float getZoom()
Returns the amount to scale on each iteration.- Returns:
- the zoom factor
- See Also:
setZoom(float)
-
setStartAlpha
public void setStartAlpha(float startAlpha)
Set the alpha value at the first iteration.- Parameters:
startAlpha- the alpha value, min-value 0, max-value 1.- See Also:
getStartAlpha()
-
getStartAlpha
public float getStartAlpha()
Get the alpha value at the first iteration.- Returns:
- the alpha value
- See Also:
setStartAlpha(float)
-
setEndAlpha
public void setEndAlpha(float endAlpha)
Set the alpha value at the last iteration.- Parameters:
endAlpha- the alpha value, min-value 0, max-value 1- See Also:
getEndAlpha()
-
getEndAlpha
public float getEndAlpha()
Get the alpha value at the last iteration.- Returns:
- the alpha value
- See Also:
setEndAlpha(float)
-
setCentreX
public void setCentreX(float centreX)
Set the centre of the effect in the X direction as a proportion of the image size.- Parameters:
centreX- the center- See Also:
getCentreX()
-
getCentreX
public float getCentreX()
Get the centre of the effect in the X direction as a proportion of the image size.- Returns:
- the center
- See Also:
setCentreX(float)
-
setCentreY
public void setCentreY(float centreY)
Set the centre of the effect in the Y direction as a proportion of the image size.- Parameters:
centreY- the center- See Also:
getCentreY()
-
getCentreY
public float getCentreY()
Get the centre of the effect in the Y direction as a proportion of the image size.- Returns:
- the center
- See Also:
setCentreY(float)
-
setCentre
public void setCentre(java.awt.geom.Point2D centre)
Set the centre of the effect as a proportion of the image size.- Parameters:
centre- the center- See Also:
getCentre()
-
getCentre
public java.awt.geom.Point2D getCentre()
Get the centre of the effect as a proportion of the image size.- Returns:
- the center
- See Also:
setCentre(java.awt.geom.Point2D)
-
setIterations
public void setIterations(int iterations)
Set the number of iterations.- Parameters:
iterations- the number of iterations, min-value 0- See Also:
getIterations()
-
getIterations
public int getIterations()
Get the number of iterations.- Returns:
- the number of iterations
- See Also:
setIterations(int)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-