Serializable, Comparable<Texture.AlphaType>public static enum Texture.AlphaType extends Enum<Texture.AlphaType>
A pixel has multiple levels of transparency. In a simple alpha blending, alpha weighting is performed on the drawing color and the target color to obtain a new color. For example, if the alpha value is a number from 0 to 1, the formula for calculating the value of the new color is as follows: New color = Drawing color x Alpha value + Target color x (1 - Alpha value).
| 枚举常量 | 说明 |
|---|---|
OPAQUE_ALPHATYPE |
Indicates that the pixel is opaque.
|
PREMUL_ALPHATYPE |
Indicates that the component of each pixel is premultiplied by the alpha value.
|
UNKNOWN_ALPHATYPE |
Indicates that the alpha type is uninitialized.
|
UNPREMUL_ALPHATYPE |
Indicates that the pixel is irrelevant to the alpha value.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
value() |
Obtains the enumeration identifier of the alpha type in this
Texture. |
static Texture.AlphaType |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static Texture.AlphaType[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (Texture.AlphaType c : Texture.AlphaType.values()) System.out.println(c); |
public static final Texture.AlphaType UNKNOWN_ALPHATYPE
public static final Texture.AlphaType OPAQUE_ALPHATYPE
public static final Texture.AlphaType PREMUL_ALPHATYPE
public static final Texture.AlphaType UNPREMUL_ALPHATYPE
public static Texture.AlphaType[] values()
for (Texture.AlphaType c : Texture.AlphaType.values()) System.out.println(c);
public static Texture.AlphaType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int value()
Texture.Texture.