Package edu.cornell.gdiac.graphics
Enum Class SpriteBatch.BlendMode
- All Implemented Interfaces:
Serializable,Comparable<SpriteBatch.BlendMode>,Constable
- Enclosing class:
- SpriteBatch
An enumeration of standard color blending options.
While we allow full control of color blending in our sprite batch, 99% of the time we find that the following blend options are sufficient. Note that these modes apply to a spritebatch/2d graphics pipeline and do not necessarily generalize to other pipelines.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionColor values are added together, causing a white-out effectAlpha blending on, assuming the colors have no pre-multipled alpha (DEFAULT)Color values are draw on top of one another with no transparency supportAlpha blending on, assuming the colors have pre-multipled alpha (uncommon) -
Method Summary
Modifier and TypeMethodDescriptionstatic SpriteBatch.BlendModeReturns the enum constant of this class with the specified name.static SpriteBatch.BlendMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALPHA_BLEND
Alpha blending on, assuming the colors have no pre-multipled alpha (DEFAULT) -
PREMULT
Alpha blending on, assuming the colors have pre-multipled alpha (uncommon) -
ADDITIVE
Color values are added together, causing a white-out effect -
OPAQUE
Color values are draw on top of one another with no transparency support
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-