Package com.jhlabs.image
Class MotionBlurOp
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.MotionBlurOp
-
- All Implemented Interfaces:
MotionBlur
,java.awt.image.BufferedImageOp
,java.lang.Cloneable
- Direct Known Subclasses:
RaysFilter
public class MotionBlurOp extends AbstractBufferedImageOp implements MotionBlur
A filter which produces motion blur the faster, but lower-quality way.
-
-
Constructor Summary
Constructors Constructor Description MotionBlurOp()
Construct a MotionBlurOp.MotionBlurOp(float distance, float angle, float rotation, float zoom)
Construct a MotionBlurOp.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
float
getAngle()
Returns the angle of blur.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
getDistance()
Get the distance of blur.float
getRotation()
Get the blur rotation.float
getZoom()
Get the blur zoom.void
setAngle(float angle)
Specifies the angle of blur.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
setDistance(float distance)
Set the distance of blur.void
setRotation(float rotation)
Set the blur rotation.void
setZoom(float zoom)
Set the blur zoom.java.lang.String
toString()
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
Constructor Detail
-
MotionBlurOp
public MotionBlurOp()
Construct a MotionBlurOp.
-
MotionBlurOp
public MotionBlurOp(float distance, float angle, float rotation, float zoom)
Construct a MotionBlurOp.- Parameters:
distance
- the distance of blur.angle
- the angle of blur.rotation
- the angle of rotation.zoom
- the zoom factor.
-
-
Method Detail
-
setAngle
public void setAngle(float angle)
Specifies the angle of blur.- Specified by:
setAngle
in interfaceMotionBlur
- Parameters:
angle
- the angle of blur.- See Also:
getAngle()
-
getAngle
public float getAngle()
Returns the angle of blur.- Specified by:
getAngle
in interfaceMotionBlur
- Returns:
- the angle of blur.
- See Also:
setAngle(float)
-
setDistance
public void setDistance(float distance)
Set the distance of blur.- Specified by:
setDistance
in interfaceMotionBlur
- Parameters:
distance
- the distance of blur.- See Also:
getDistance()
-
getDistance
public float getDistance()
Get the distance of blur.- Specified by:
getDistance
in interfaceMotionBlur
- Returns:
- the distance of blur.
- See Also:
setDistance(float)
-
setRotation
public void setRotation(float rotation)
Set the blur rotation.- Specified by:
setRotation
in interfaceMotionBlur
- Parameters:
rotation
- the angle of rotation.- See Also:
getRotation()
-
getRotation
public float getRotation()
Get the blur rotation.- Specified by:
getRotation
in interfaceMotionBlur
- Returns:
- the angle of rotation.
- See Also:
setRotation(float)
-
setZoom
public void setZoom(float zoom)
Set the blur zoom.- Specified by:
setZoom
in interfaceMotionBlur
- Parameters:
zoom
- the zoom factor.- See Also:
getZoom()
-
getZoom
public float getZoom()
Get the blur zoom.- Specified by:
getZoom
in interfaceMotionBlur
- Returns:
- the zoom factor.
- See Also:
setZoom(float)
-
setCentreX
public void setCentreX(float centreX)
Set the centre of the effect in the X direction as a proportion of the image size.- Specified by:
setCentreX
in interfaceMotionBlur
- 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.- Specified by:
getCentreX
in interfaceMotionBlur
- 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.- Specified by:
setCentreY
in interfaceMotionBlur
- 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.- Specified by:
getCentreY
in interfaceMotionBlur
- 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.- Specified by:
setCentre
in interfaceMotionBlur
- 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.- Specified by:
getCentre
in interfaceMotionBlur
- Returns:
- the center
- See Also:
setCentre(java.awt.geom.Point2D)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
- Specified by:
filter
in interfacejava.awt.image.BufferedImageOp
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-