Package io.github.humbleui.skija
Enum ColorAlphaType
- java.lang.Object
-
- java.lang.Enum<ColorAlphaType>
-
- io.github.humbleui.skija.ColorAlphaType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ColorAlphaType>
public enum ColorAlphaType extends java.lang.Enum<ColorAlphaType>
Describes how to interpret the alpha component of a pixel. A pixel may be opaque, or alpha, describing multiple levels of transparency.
In simple blending, alpha weights the draw color and the destination color to create a new color. If alpha describes a weight from zero to one:
new color = draw color * alpha + destination color * (1 - alpha)In practice alpha is encoded in two or more bits, where 1.0 equals all bits set.
RGB may have alpha included in each component value; the stored value is the original RGB multiplied by alpha. Premultiplied color components improve performance.
-
-
Field Summary
Fields Modifier and Type Field Description static ColorAlphaType[]_values
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ColorAlphaTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ColorAlphaType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final ColorAlphaType UNKNOWN
uninitialized
-
OPAQUE
public static final ColorAlphaType OPAQUE
pixel is opaque
-
PREMUL
public static final ColorAlphaType PREMUL
pixel components are premultiplied by alpha
-
UNPREMUL
public static final ColorAlphaType UNPREMUL
pixel components are independent of alpha
-
-
Field Detail
-
_values
@Internal public static final ColorAlphaType[] _values
-
-
Method Detail
-
values
public static ColorAlphaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ColorAlphaType c : ColorAlphaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColorAlphaType 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 namejava.lang.NullPointerException- if the argument is null
-
-