ch.reto_hoehener.japng
Enum BlendOp

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

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

Blending Operation - Specifies whether the frame is to be alpha blended into the current output buffer content, or whether it should completely replace its region in the output buffer.

Note that for the first frame the two blend modes are functionally equivalent due to the clearing of the output buffer at the beginning of each play.

(quoted from the APNG specification)

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

Enum Constant Summary
OVER
          The frame should be composited onto the output buffer based on its alpha, using a simple OVER operation as described in the "Alpha Channel Processing" section of the PNG specification [PNG-1.2].
SOURCE
          All color components of the frame, including alpha, overwrite the current contents of the frame's output buffer region.
 
Method Summary
static BlendOp valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BlendOp[] 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

SOURCE

public static final BlendOp SOURCE
All color components of the frame, including alpha, overwrite the current contents of the frame's output buffer region.

(quoted from the APNG specification)

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


OVER

public static final BlendOp OVER
The frame should be composited onto the output buffer based on its alpha, using a simple OVER operation as described in the "Alpha Channel Processing" section of the PNG specification [PNG-1.2]. Note that the second variation of the sample code is applicable.

(quoted from the APNG specification)

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

Method Detail

values

public static final BlendOp[] 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(BlendOp c : BlendOp.values())
        System.out.println(c);

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

valueOf

public static BlendOp 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