ch.reto_hoehener.japng
Enum DisposeOp

java.lang.Object
  extended by java.lang.Enum<DisposeOp>
      extended by ch.reto_hoehener.japng.DisposeOp
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DisposeOp>

public enum DisposeOp
extends java.lang.Enum<DisposeOp>

Disposal Operation - Specifies how the output buffer should be changed at the end of the delay (before rendering the next frame).

(quoted from the APNG specification)

Version:
$Id: DisposeOp.java 30 2008-02-23 22:29:51Z reto $

Enum Constant Summary
BACKGROUND
           The frame's region of the output buffer is to be cleared to fully transparent black before rendering the next frame.
NONE
           No disposal is done on this frame before rendering the next; the contents of the output buffer are left as is.
PREVIOUS
           The frame's region of the output buffer is to be reverted to the previous contents before rendering the next frame.
 
Method Summary
static DisposeOp valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DisposeOp[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final DisposeOp NONE

No disposal is done on this frame before rendering the next; the contents of the output buffer are left as is.

(quoted from the APNG specification)

This corresponds to "APNG_DISPOSE_OP_NONE" or an int value of 0.


BACKGROUND

public static final DisposeOp BACKGROUND

The frame's region of the output buffer is to be cleared to fully transparent black before rendering the next frame.

(quoted from the APNG specification)

This corresponds to "APNG_DISPOSE_OP_BACKGROUND" or an int value of 1.


PREVIOUS

public static final DisposeOp PREVIOUS

The frame's region of the output buffer is to be reverted to the previous contents before rendering the next frame.

If the first frame uses a dispose operation of PREVIOUS it should be treated as BACKGROUND (by the viewer).

(quoted from the APNG specification)

This corresponds to "APNG_DISPOSE_OP_PREVIOUS" or an int value of 2.

Method Detail

values

public static final DisposeOp[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DisposeOp c : DisposeOp.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DisposeOp valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name