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.


Constructor Index

 o 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.
 o 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.

Method Index

 o doTime(boolean)
If true then the effect will run in the time alloted.
 o doTransition()
This will run the currently selected effect on the visual rectangle that is defined by the display bounds of this object.
 o getDestinationImage()
Returns the current destination image
 o getFramesPerSecond()
Returns the current frames per second that the effect draws in if the effect is rendered using the time constraint
 o getTime()
Returns the time that an effect will run for in milliseconds
 o isProfiled()
Returns the current profiling status.
 o 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
 o profileDuration()
If profiling this returns the total time it took to run the doTransition method.
 o profileFramesRendered()
If profiling this returns the number of frames that were rendered in the last time that the doTransition() method was called.
 o setCurrentFrame(int)
This sets the current frame of the effect.
 o setDestinationImage(ImageSpec)
Sets the destination image of the Transition - the image that the transition will transition to.
 o setEffect(AtomContainer)
This method will take the incoming parameters and use this as the control parameters for the effect.
 o setFrames(int)
Sets the maximum number of frames that an effect can run for.
 o setFramesPerSecond(int)
Sets the maximum frames per second that the effect will attempt to render
 o setProfiled(boolean)
Set this to true if you wish to profile the actual running of the effect, or false to not collect.
 o setTime(int)
Sets the duration of the effect when it is run if the effect is run in time mode
 o setUpSequence()
This method is called by a number of other methods to create the DSequence that is used to render the QTEffect.
 o swapImages()
This swaps the source and destination images.

Constructors

 o 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.

 o 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.

Methods

 o 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
 o setDestinationImage
 public void setDestinationImage(ImageSpec image) throws QTException
Sets the destination image of the Transition - the image that the transition will transition to.

 o getDestinationImage
 public ImageSpec getDestinationImage()
Returns the current destination image

 o 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
 o 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

 o swapImages
 public void swapImages() throws QTException
This swaps the source and destination images.

 o setFrames
 public synchronized void setFrames(int frames) throws QTException
Sets the maximum number of frames that an effect can run for.

 o setFramesPerSecond
 public void setFramesPerSecond(int frames) throws QTException
Sets the maximum frames per second that the effect will attempt to render

 o 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
 o 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
 o 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
 o getTime
 public int getTime()
Returns the time that an effect will run for in milliseconds

Returns:
milliseconds
 o 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
 o 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.
 o 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
 o isProfiled
 public boolean isProfiled()
Returns the current profiling status.

Returns:
a boolean indicating the profiling status of the transition
 o 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
 o 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