com.jhlabs.image

Class MotionBlurOp

Implemented Interfaces:
BufferedImageOp, Cloneable, MotionBlur
Known Direct Subclasses:
RaysFilter

public class MotionBlurOp
extends AbstractBufferedImageOp
implements MotionBlur

A filter which produces motion blur the faster, but lower-quality way.

Constructor Summary

MotionBlurOp()
Construct a MotionBlurOp.
MotionBlurOp(float distance, float angle, float rotation, float zoom)
Construct a MotionBlurOp.

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
float
getAngle()
Returns the angle of blur.
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(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.
String
toString()

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Constructor Details

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 Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)

getAngle

public float getAngle()
Returns the angle of blur.
Specified by:
getAngle in interface MotionBlur
Returns:
the angle of blur.

getCentre

public Point2D getCentre()
Get the centre of the effect as a proportion of the image size.
Specified by:
getCentre in interface MotionBlur
Returns:
the center

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 interface MotionBlur
Returns:
the center

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 interface MotionBlur
Returns:
the center

getDistance

public float getDistance()
Get the distance of blur.
Specified by:
getDistance in interface MotionBlur
Returns:
the distance of blur.

getRotation

public float getRotation()
Get the blur rotation.
Specified by:
getRotation in interface MotionBlur
Returns:
the angle of rotation.

getZoom

public float getZoom()
Get the blur zoom.
Specified by:
getZoom in interface MotionBlur
Returns:
the zoom factor.

setAngle

public void setAngle(float angle)
Specifies the angle of blur.
Specified by:
setAngle in interface MotionBlur
Parameters:
angle - the angle of blur.
See Also:
getAngle()

setCentre

public void setCentre(Point2D centre)
Set the centre of the effect as a proportion of the image size.
Specified by:
setCentre in interface MotionBlur
Parameters:
centre - the center
See Also:
getCentre()

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 interface MotionBlur
Parameters:
centreX - the center
See Also:
getCentreX()

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 interface MotionBlur
Parameters:
centreY - the center
See Also:
getCentreY()

setDistance

public void setDistance(float distance)
Set the distance of blur.
Specified by:
setDistance in interface MotionBlur
Parameters:
distance - the distance of blur.
See Also:
getDistance()

setRotation

public void setRotation(float rotation)
Set the blur rotation.
Specified by:
setRotation in interface MotionBlur
Parameters:
rotation - the angle of rotation.
See Also:
getRotation()

setZoom

public void setZoom(float zoom)
Set the blur zoom.
Specified by:
setZoom in interface MotionBlur
Parameters:
zoom - the zoom factor.
See Also:
getZoom()

toString

public String toString()