All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.app.image.QTTransition
java.lang.Object
|
+----quicktime.app.image.QTEffect
|
+----quicktime.app.image.QTFilter
|
+----quicktime.app.image.QTTransition
- public class QTTransition
- extends QTFilter
QTTransistions are visual effects that are applied to a two images, transitioning from
the source image to the destination image. Upon completion of the transition the source and
destination images are swapped, so you can also transition back to the original source image
or set a new desintation image.
The QTTransition can run in two modes - in time mode the doTransition method will run the effect in
as close as time as possible to the time specified. In frames mode the effect will be run
for the number of frames that are specified.
The doTransition method is provided as a means of running the transition according to the
time or frames setting. The transition will run as effectively as possible from start to
finish - it is a call that blocks the thread of execution that made this call whilst the
transition is running.
If a transition should be run with more application control then the application can control
the setting of the current frame of the transition and call redraw after setting each frame.
The redraw method will redraw the current frame of the transition.
-
QTTransition()
- Creates a QTTransition with default settings of a time-specified duration of 2000 msecs,
an effect fps of 20, a redraw setting as kMultiFrame and an initialSize of 0, 0.
-
QTTransition(Dimension)
- Creates a QTTransition with default settings of a time-specified duration of 2000 msecs,
an effect fps of 20, a redraw setting as kMultiFrame and the specified initialSize.
-
doTime(boolean)
-
If true then the effect will run in the time alloted.
-
doTransition()
- This will run the currently selected effect on the visual rectangle that is defined by the display
bounds of this object.
-
getDestinationImage()
- Returns the current destination image
-
getFramesPerSecond()
- Returns the current frames per second that the effect draws in
if the effect is rendered using the time constraint
-
getTime()
- Returns the time that an effect will run for in milliseconds
-
isProfiled()
-
Returns the current profiling status.
-
isTime()
-
Returns true if the effect is running for a specified duration or
false if the effect is running for a specified number of frames
-
profileDuration()
- If profiling this returns the total time it took to run the doTransition method.
-
profileFramesRendered()
- If profiling this returns the number of frames that were rendered in the last time
that the doTransition() method was called.
-
setCurrentFrame(int)
- This sets the current frame of the effect.
-
setDestinationImage(ImageSpec)
- Sets the destination image of the Transition - the image that the transition will transition to.
-
setEffect(AtomContainer)
- This method will take the incoming parameters and use this as the control parameters for the
effect.
-
setFrames(int)
- Sets the maximum number of frames that an effect can run for.
-
setFramesPerSecond(int)
- Sets the maximum frames per second that the effect will attempt to render
-
setProfiled(boolean)
-
Set this to true if you wish to profile the actual running of the effect, or false to not collect.
-
setTime(int)
-
Sets the duration of the effect when it is run if the effect is run in time mode
-
setUpSequence()
- This method is called by a number of other methods to create
the DSequence that is used to render the QTEffect.
-
swapImages()
- This swaps the source and destination images.
QTTransition
public QTTransition() throws QTException
- Creates a QTTransition with default settings of a time-specified duration of 2000 msecs,
an effect fps of 20, a redraw setting as kMultiFrame and an initialSize of 0, 0.
QTTransition
public QTTransition(Dimension d) throws QTException
- Creates a QTTransition with default settings of a time-specified duration of 2000 msecs,
an effect fps of 20, a redraw setting as kMultiFrame and the specified initialSize.
setEffect
public void setEffect(AtomContainer effectParams) throws QTException
- This method will take the incoming parameters and use this as the control parameters for the
effect. The container will be locked for the duration of the effect object's life or until
another effect is set.
- Parameters:
- effectParams - the parameters that determine the effect that is run
- Overrides:
- setEffect in class QTFilter
setDestinationImage
public void setDestinationImage(ImageSpec image) throws QTException
- Sets the destination image of the Transition - the image that the transition will transition to.
getDestinationImage
public ImageSpec getDestinationImage()
- Returns the current destination image
setUpSequence
protected synchronized boolean setUpSequence() throws QTException
- This method is called by a number of other methods to create
the DSequence that is used to render the QTEffect.
When called the method will create a new DSequence if the required
state has been established to enable the creation of the DSequence.
- Returns:
- true if a new DSequence was created, otherwise false.
- Overrides:
- setUpSequence in class QTFilter
doTransition
public synchronized void doTransition() throws QTException
- This will run the currently selected effect on the visual rectangle that is defined by the display
bounds of this object.
After the effect is run the destination image of the transition is now the visible image in the effect's display space
swapImages
public void swapImages() throws QTException
- This swaps the source and destination images.
setFrames
public synchronized void setFrames(int frames) throws QTException
- Sets the maximum number of frames that an effect can run for.
setFramesPerSecond
public void setFramesPerSecond(int frames) throws QTException
- Sets the maximum frames per second that the effect will attempt to render
getFramesPerSecond
public int getFramesPerSecond()
- Returns the current frames per second that the effect draws in
if the effect is rendered using the time constraint
- Returns:
- the fps of the effect
setCurrentFrame
public void setCurrentFrame(int frame)
- This sets the current frame of the effect. A value of zero means to draw the source image of
the transition.
- Parameters:
- frame - the frame to be rendered
setTime
public synchronized void setTime(int time) throws QTException
- Sets the duration of the effect when it is run if the effect is run in time mode
- Parameters:
- time - the time in milliseconds for the effect to run for in time mode
getTime
public int getTime()
- Returns the time that an effect will run for in milliseconds
- Returns:
- milliseconds
doTime
public synchronized void doTime(boolean flag)
- If true then the effect will run in the time alloted.
If false then the effect will run for the specified frames.
- Parameters:
- flag - a boolean
isTime
public boolean isTime()
- Returns true if the effect is running for a specified duration or
false if the effect is running for a specified number of frames
- Returns:
- true if the doEffect method runs the effect in time mode, false if in frame mode.
setProfiled
public void setProfiled(boolean flag)
- Set this to true if you wish to profile the actual running of the effect, or false to not collect.
Once profiling your application can determine the amount of time it took to render a transition
and how many frames were actually rendered. These values are generated and reset from each call
of the doTransition() method.
- Parameters:
- flag - if true will profile
isProfiled
public boolean isProfiled()
- Returns the current profiling status.
- Returns:
- a boolean indicating the profiling status of the transition
profileFramesRendered
public int profileFramesRendered()
- If profiling this returns the number of frames that were rendered in the last time
that the doTransition() method was called. If profiling is disabled
this method returns 0.
- Returns:
- an int
profileDuration
public int profileDuration()
- If profiling this returns the total time it took to run the doTransition method.
If profiling is disabled this method returns 0.
- Returns:
- an int
All Packages Class Hierarchy This Package Previous Next Index