com.gif4j
Class SnakeFilter

java.lang.Object
  extended bycom.gif4j.MorphingFilter
      extended bycom.gif4j.SnakeFilter

public class SnakeFilter
extends MorphingFilter

An instance of SnakeFilter implements the gradual appearance animation in the form of serial chained tiles (looks as snake).

Version:
1.0
Author:
Gif4J Software - Java GIF image processing solutions

Field Summary
static int LAY_METHOD_LEFT_RIGHT_DIRECT
          lay animation frames from left to right, starts from left-top corner
static int LAY_METHOD_LEFT_RIGHT_INVERSE
          lay animation frames from left to right and right to left, starts from left-top corner
static int LAY_METHOD_SPIRAL_FROM_CENTER
          lay animation frames by spiral, starts from center
static int LAY_METHOD_SPIRAL_FROM_CORNER
          lay animation frames by spiral, starts from left-top corner
static int LAY_METHOD_ZIG_ZAG
          lay animation frames by zig-zag starts from left-top corner
 
Fields inherited from class com.gif4j.MorphingFilter
DEFAULT_DELAY_BETWEEN_FRAMES
 
Constructor Summary
SnakeFilter(int layMethod)
          Constructs SnakeFilter of one of the predefined lay methods, default divide factor (5) and delay between frames = 0.1 sec (10 1/100 sec)
SnakeFilter(int layMethod, int divideFactor)
          Constructs SnakeFilter of one of the predefined lay methods, the specified divide factor and default delay between frames = 0.1 sec (10 1/100 sec)
SnakeFilter(int layMethod, int divideFactor, int delayBetweenFrames)
          Constructs SnakeFilter of one of the predefined lay methods, the specified divide factor and delay between frames
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAY_METHOD_LEFT_RIGHT_DIRECT

public static final int LAY_METHOD_LEFT_RIGHT_DIRECT
lay animation frames from left to right, starts from left-top corner

See Also:
Constant Field Values

LAY_METHOD_LEFT_RIGHT_INVERSE

public static final int LAY_METHOD_LEFT_RIGHT_INVERSE
lay animation frames from left to right and right to left, starts from left-top corner

See Also:
Constant Field Values

LAY_METHOD_SPIRAL_FROM_CENTER

public static final int LAY_METHOD_SPIRAL_FROM_CENTER
lay animation frames by spiral, starts from center

See Also:
Constant Field Values

LAY_METHOD_SPIRAL_FROM_CORNER

public static final int LAY_METHOD_SPIRAL_FROM_CORNER
lay animation frames by spiral, starts from left-top corner

See Also:
Constant Field Values

LAY_METHOD_ZIG_ZAG

public static final int LAY_METHOD_ZIG_ZAG
lay animation frames by zig-zag starts from left-top corner

See Also:
Constant Field Values
Constructor Detail

SnakeFilter

public SnakeFilter(int layMethod)
Constructs SnakeFilter of one of the predefined lay methods, default divide factor (5) and delay between frames = 0.1 sec (10 1/100 sec)

Parameters:
layMethod - one of the predefined lay methods: LAY_METHOD_SPIRAL_FROM_CENTER, LAY_METHOD_SPIRAL_FROM_CORNER, LAY_METHOD_ZIG_ZAG, LAY_METHOD_LEFT_RIGHT_DIRECT, LAY_METHOD_LEFT_RIGHT_INVERSE
Throws:
java.lang.IllegalArgumentException - If unknown lay method

SnakeFilter

public SnakeFilter(int layMethod,
                   int divideFactor)
Constructs SnakeFilter of one of the predefined lay methods, the specified divide factor and default delay between frames = 0.1 sec (10 1/100 sec)

Parameters:
layMethod - one of the predefined lay methods: LAY_METHOD_SPIRAL_FROM_CENTER, LAY_METHOD_SPIRAL_FROM_CORNER, LAY_METHOD_ZIG_ZAG, LAY_METHOD_LEFT_RIGHT_DIRECT, LAY_METHOD_LEFT_RIGHT_INVERSE
divideFactor - number of generated tiles = squared divide factor. For example, value of 5 means 25 tiles (frames) to generate
Throws:
java.lang.IllegalArgumentException - If unknown lay method
java.lang.IllegalArgumentException - If divide factor less than 2

SnakeFilter

public SnakeFilter(int layMethod,
                   int divideFactor,
                   int delayBetweenFrames)
Constructs SnakeFilter of one of the predefined lay methods, the specified divide factor and delay between frames

Parameters:
layMethod - one of the predefined lay methods: LAY_METHOD_SPIRAL_FROM_CENTER, LAY_METHOD_SPIRAL_FROM_CORNER, LAY_METHOD_ZIG_ZAG, LAY_METHOD_LEFT_RIGHT_DIRECT, LAY_METHOD_LEFT_RIGHT_INVERSE
divideFactor - number of generated tiles = squared divide factor. For example, value of 5 means 25 generated tiles
delayBetweenFrames - delay time in 1/100 seconds (100 means 1 second delay) between generated frames.
Throws:
java.lang.IllegalArgumentException - If unknown lay method
java.lang.IllegalArgumentException - If divide factor less than 2
java.lang.IllegalArgumentException - If delay less than 1