Copyright 2013-01-06 Werner Randelshofer

org.monte.media.ilbm
Class ColorCycle

java.lang.Object
  extended by org.monte.media.ilbm.ColorCycle
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
CRNGColorCycle, DRNGColorCycle

public abstract class ColorCycle
extends java.lang.Object
implements java.lang.Cloneable

Base class for color cycling in an IFF ILBM image.

Version:
1.1 2010-08-03 Added support for blended cycles.
1.0 2010-01-22 Created.
Author:
Werner Randelshofer

Field Summary
protected  boolean isActive
          Whether the color cycle is active.
protected  boolean isBlended
          Whether colors are blended into each other when shifted.
protected  int rate
          Cycle rate.
protected  int timeScale
          Time scale of the cycle rate.
 
Constructor Summary
ColorCycle(int rate, int timeScale, boolean isActive)
           
 
Method Summary
protected  java.lang.Object clone()
           
abstract  void doCycle(int[] rgbs, long time)
           
 int getRate()
           
 int getTimeScale()
           
 boolean isActive()
           
 boolean isBlended()
          Returns true if colors are blended when shifted.
 void setBlended(boolean newValue)
          Set to true to blend colors when they are shifted.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rate

protected int rate
Cycle rate.


timeScale

protected int timeScale
Time scale of the cycle rate. Dividing the rate by the time scale yields the rate per second.


isActive

protected boolean isActive
Whether the color cycle is active.


isBlended

protected boolean isBlended
Whether colors are blended into each other when shifted.

Constructor Detail

ColorCycle

public ColorCycle(int rate,
                  int timeScale,
                  boolean isActive)
Method Detail

isActive

public boolean isActive()

getRate

public int getRate()

getTimeScale

public int getTimeScale()

isBlended

public boolean isBlended()
Returns true if colors are blended when shifted.


setBlended

public void setBlended(boolean newValue)
Set to true to blend colors when they are shifted.


doCycle

public abstract void doCycle(int[] rgbs,
                             long time)

clone

protected java.lang.Object clone()
Overrides:
clone in class java.lang.Object

Copyright 2013-01-06 Werner Randelshofer