visual.dynamic.sampled
Class Fade

java.lang.Object
  extended by visual.dynamic.sampled.AbstractFrameOp
      extended by visual.dynamic.sampled.AbstractTransition
          extended by visual.dynamic.sampled.Fade
All Implemented Interfaces:
FrameOp, Transition
Direct Known Subclasses:
Dissolve

public class Fade
extends AbstractTransition

A fade-in or fade-out to the background color (which may or may not be black))

See Also:
"The Design and Implementation of Multimedia Software © 2011"

Field Summary
static int FADE_IN
           
static int FADE_OUT
           
 
Fields inherited from class visual.dynamic.sampled.AbstractFrameOp
duration, first
 
Constructor Summary
Fade(int direction, int first, int duration)
          Explicit Value Constructor
 
Method Summary
 void postRendering(java.awt.Graphics g, int frame)
          Apply the post-rendering portion of this Transition
 void preRendering(java.awt.Graphics g, int frame)
          Apply the pre-rendering portion of this Transition
protected  void setDestinationPixels(java.awt.Graphics g)
          Set the destination (in the Porter-Duff sense) pixels to be used in alpha blending
 
Methods inherited from class visual.dynamic.sampled.AbstractFrameOp
getFirstFrame, getLastFrame, hasFinishedAt, shouldApplyAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface visual.dynamic.sampled.FrameOp
getFirstFrame, getLastFrame
 

Field Detail

FADE_IN

public static final int FADE_IN
See Also:
Constant Field Values

FADE_OUT

public static final int FADE_OUT
See Also:
Constant Field Values
Constructor Detail

Fade

public Fade(int direction,
            int first,
            int duration)
Explicit Value Constructor

Parameters:
direction - FADE_IN or FADE_OUT
first - The first frame
duration - The duration (in frames)
Method Detail

postRendering

public void postRendering(java.awt.Graphics g,
                          int frame)
Apply the post-rendering portion of this Transition

Specified by:
postRendering in interface FrameOp
Specified by:
postRendering in class AbstractTransition
Parameters:
g - The rendering engine
frame - The current frame number

preRendering

public void preRendering(java.awt.Graphics g,
                         int frame)
Apply the pre-rendering portion of this Transition

Specified by:
preRendering in interface FrameOp
Specified by:
preRendering in class AbstractTransition
Parameters:
g - The rendering engine
frame - The current frame number

setDestinationPixels

protected void setDestinationPixels(java.awt.Graphics g)
Set the destination (in the Porter-Duff sense) pixels to be used in alpha blending

Parameters:
g - The rendering engine


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers