com.jhlabs.image
Class TransitionFilter
- BufferedImageOp, Cloneable
public class TransitionFilter
A filter which uses another filter to perform a transition.
e.g. to create a blur transition, you could write: new TransitionFilter( new BoxBlurFilter(), "radius", 0, 100 );
protected BufferedImageOp | filter - The filter used for the transition.
|
protected float | maxValue - The end value for the filter property.
|
protected float | minValue - The start value for the filter property.
|
TransitionFilter(BufferedImageOp filter, String property, float minValue, float maxValue) - Construct a TransitionFilter.
|
BufferedImage | filter(BufferedImage src, BufferedImage dst)
|
BufferedImage | getDestination() - Get the destination image.
|
float | getTransition() - Get the transition of the image.
|
void | prepareFilter(float transition) - Prepare the filter for the transiton at a given time.
|
void | setDestination(BufferedImage destination) - Set the destination image.
|
void | setTransition(float transition) - Set the transition of the image in the range 0..1.
|
String | toString()
|
filter
protected BufferedImageOp filter
The filter used for the transition.
maxValue
protected float maxValue
The end value for the filter property.
minValue
protected float minValue
The start value for the filter property.
TransitionFilter
public TransitionFilter(BufferedImageOp filter,
String property,
float minValue,
float maxValue)
Construct a TransitionFilter.
filter
- the filter to useproperty
- the filter property which is changed over the transitionminValue
- the start value for the filter propertymaxValue
- the end value for the filter property
filter
public BufferedImage filter(BufferedImage src,
BufferedImage dst)
getDestination
public BufferedImage getDestination()
Get the destination image.
getTransition
public float getTransition()
Get the transition of the image.
prepareFilter
public void prepareFilter(float transition)
Prepare the filter for the transiton at a given time.
The default implementation sets the given filter property, but you could override this method to make other changes.
transition
- the transition time in the range 0 - 1
setDestination
public void setDestination(BufferedImage destination)
Set the destination image.
destination
- the destination image
setTransition
public void setTransition(float transition)
Set the transition of the image in the range 0..1.
transition
- the transition
toString
public String toString()