quicktime.app.image
Class CompositableEffect

java.lang.Object
  |
  +--quicktime.app.image.QTEffect
        |
        +--quicktime.app.image.CompositableEffect
All Implemented Interfaces:
Compositable, Drawable, DynamicImage, ImageSpec, Listener, QTDrawable, Redrawable, Transformable

public class CompositableEffect
extends QTEffect
implements DynamicImage, Redrawable

This class is used to directly add an effect to a SWCompositor. Only effects of zero source (such as fire, ripple) can be added directly. Filters and Transitions act on one or two sources and must be added to a SWCompositor using the QTEffectPresenter.

See Also:
QTEffectPresenter

Fields inherited from interface quicktime.app.image.Redrawable
kMultiFrame, kSingleFrame
 
Constructor Summary
CompositableEffect()
          Creates a CompositableEffect.
CompositableEffect(int multiFrameFlag)
          Creates a CompositableEffect.
 
Method Summary
 Invalidator addedToCompositor(SWCompositor c, TwoDSprite s)
          Returns an object that invalidates a sprite.
 void removedFromCompositor(SWCompositor c)
          When a dynamic image class is removed from a SWCompositor this method is called to allow the class to cleanup any of the invalidation processes it had established in the addedToCompositor call.
 
Methods inherited from class quicktime.app.image.QTEffect
addedTo, checkForEffect, getClip, getCurrentFrame, getDescription, getDisplayBounds, getDSequence, getEffect, getFrames, getGraphicsMode, getGWorld, getImage, getInitialSize, getMatrix, getOriginalSize, isRedrawing, isSingleFrame, redraw, removedFrom, setClip, setDisplayBounds, setEffect, setGraphicsMode, setGWorld, setLocation, setMatrix, setRedrawing, setUpSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface quicktime.app.image.Compositable
getGraphicsMode, setGraphicsMode
 
Methods inherited from interface quicktime.app.image.ImageSpec
getDescription, getImage
 
Methods inherited from interface quicktime.app.image.Redrawable
isRedrawing, isSingleFrame, setRedrawing
 

Constructor Detail

CompositableEffect

public CompositableEffect()
                   throws QTException
Creates a CompositableEffect.

CompositableEffect

public CompositableEffect(int multiFrameFlag)
                   throws QTException
Creates a CompositableEffect. The specified multiFrameFlag parameter should be set to Redrawable.kMultiFrame as all of the existing QTEffects require redrawing (and thus Invalidation) for their visual effect to be apparent.
Parameters:
multiFrameFlag - is normally set to kMultiFrame
Method Detail

addedToCompositor

public Invalidator addedToCompositor(SWCompositor c,
                                     TwoDSprite s)
Returns an object that invalidates a sprite. When a DynamicImage is a member of a SWompositor and the DynamicImage presents a changing image (for example a movie), the TwoDSprite that presents that image in the SWCompositor must be invalidated so that it will redraw the Sprites image in the next composit cycle. The Invalidator object is used to perform this function by the SWCompositor if the object itself cannot perform the invalidation. Can return null if the DynamicImage does not require the SWCompositor to invalidate it (or the object is in a state where its image won't change).

The Invalidators provided with objects that implement the DynamicImage interface will execute at the scale and period of the Compositor when they are created.

Specified by:
addedToCompositor in interface DynamicImage
Parameters:
c - the Compositor in which the DynamicImage is a member
s - the TwoDSprite that is presenting the DynamicImage's image in the Compositor. This is the sprite that must be invalidated.
Returns:
an Invalidator or null if invalidation is not required
See Also:
quicktime.app.display.SWCompositor

removedFromCompositor

public void removedFromCompositor(SWCompositor c)
When a dynamic image class is removed from a SWCompositor this method is called to allow the class to cleanup any of the invalidation processes it had established in the addedToCompositor call.
Specified by:
removedFromCompositor in interface DynamicImage
Parameters:
c - the SWCompositor it is being removed from