Package playn.core
Enum Class Canvas.Composite
- All Implemented Interfaces:
Serializable
,Comparable<Canvas.Composite>
,java.lang.constant.Constable
- Enclosing class:
Canvas
Values that may be used with
Canvas.setCompositeOperation(Composite)
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Canvas.Composite
Returns the enum constant of this class with the specified name.static Canvas.Composite[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SRC
A (B is ignored). Display the source image instead of the destination image.[Sa, Sc]
-
DST_ATOP
B atop A. Same as source-atop but using the destination image instead of the source image and vice versa.[Sa, Sa * Dc + Sc * (1 - Da)]
. -
SRC_OVER
A over B. Display the source image wherever the source image is opaque. Display the destination image elsewhere.[Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc]
. -
DST_OVER
B over A. Same as source-over but using the destination image instead of the source image and vice versa.[Sa + (1 - Sa)*Da, Rc = Dc + (1 - Da)*Sc]
. -
SRC_IN
A in B. Display the source image wherever both the source image and destination image are opaque. Display transparency elsewhere.[Sa * Da, Sc * Da]
. -
DST_IN
B in A. Same as source-in but using the destination image instead of the source image and vice versa.[Sa * Da, Sa * Dc]
. -
SRC_OUT
A out B. Display the source image wherever the source image is opaque and the destination image is transparent. Display transparency elsewhere.[Sa * (1 - Da), Sc * (1 - Da)]
. -
DST_OUT
B out A. Same as source-out but using the destination image instead of the source image and vice versa.[Da * (1 - Sa), Dc * (1 - Sa)]
. -
SRC_ATOP
A atop B. Display the source image wherever both images are opaque. Display the destination image wherever the destination image is opaque but the source image is transparent. Display transparency elsewhere.[Da, Sc * Da + (1 - Sa) * Dc]
. -
XOR
A xor B. Exclusive OR of the source image and destination image.[Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc]
. -
MULTIPLY
A * B. Multiplies the source and destination images. NOTE: this is not supported by the HTML5 and Flash backends.[Sa * Da, Sc * Dc]
.
-
-
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
-