visual.dynamic.sampled
Class RectangleWipe

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

public class RectangleWipe
extends AbstractTransition

A wipe that consists of a rectangle that grows from the center

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

Field Summary
protected  float scale
           
 
Fields inherited from class visual.dynamic.sampled.AbstractFrameOp
duration, first
 
Constructor Summary
RectangleWipe(int first, int duration)
          Explicit Value Constructor
 
Method Summary
protected  java.awt.geom.Rectangle2D calculateClip(float width, float height, int frame)
          Calculate the size of the clip rectangle
 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
 
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

scale

protected float scale
Constructor Detail

RectangleWipe

public RectangleWipe(int first,
                     int duration)
Explicit Value Constructor

Parameters:
first - The first frame
duration - The duration (in frames)
Method Detail

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

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

calculateClip

protected java.awt.geom.Rectangle2D calculateClip(float width,
                                                  float height,
                                                  int frame)
Calculate the size of the clip rectangle

Parameters:
width - The width of the image
height - The height of the image
frame - The frame of the wipe


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers