public enum GlobalCompositeOperation extends Enum<GlobalCompositeOperation> implements Key
Enum Constant and Description |
---|
COLOR
Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.
|
COLOR_BURN
Divides the inverted bottom layer by the top layer, and then inverts the result.
|
COLOR_DODGE
Divides the bottom layer by the inverted top layer.
|
COPY
Only the new shape is shown.
|
DARKEN
Retains the darkest pixels of both layers.
|
DESTINATION_ATOP
The existing canvas is only kept where it overlaps the new shape.
The new shape is drawn behind the canvas content. |
DESTINATION_IN
The existing canvas content is kept where both the new shape and existing canvas content overlap.
Everything else is made transparent. |
DESTINATION_OUT
The existing content is kept where it doesn't overlap the new shape.
|
DESTINATION_OVER
New shapes are drawn behind the existing canvas content.
|
DIFFERENCE
Subtracts the bottom layer from the top layer or the other way round to always get a positive value.
|
EXCLUSION
Like difference, but with lower contrast.
|
HARD_LIGHT
A combination of multiply and screen like overlay, but with top and bottom layer swapped.
|
HUE
Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.
|
LIGHTEN
Retains the lightest pixels of both layers.
|
LIGHTER
Where both shapes overlap the color is determined by adding color values.
|
LUMINOSITY
Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.
|
MULTIPLY
The pixels of the top layer are multiplied with the corresponding pixel of the bottom layer.
A darker picture is the result. |
OVERLAY
A combination of multiply and screen.
Dark parts on the base layer become darker, and light parts become lighter. |
SATURATION
Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.
|
SCREEN
The pixels are inverted, multiplied, and inverted again.
A lighter picture is the result (opposite of multiply) |
SOFT_LIGHT
A softer version of hard-light.
Pure black or white does not result in pure black or white. |
SOURCE_ATOP
The new shape is only drawn where it overlaps the existing canvas content.
|
SOURCE_IN
The new shape is drawn only where both the new shape and the destination canvas overlap.
Everything else is made transparent. |
SOURCE_OUT
The new shape is drawn where it doesn't overlap the existing canvas content.
|
SOURCE_OVER
This is the default setting and draws new shapes on top of the existing canvas content.
|
XOR
Shapes are made transparent where both overlap and drawn normal everywhere else.
|
Modifier and Type | Method and Description |
---|---|
String |
value()
Returns the name value of property
|
static GlobalCompositeOperation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GlobalCompositeOperation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
checkAndGetIfValid, checkIfValid, compare, create, equals, getKeyByValue, getKeyByValue, hasKeyByValue, isValid
public static final GlobalCompositeOperation SOURCE_OVER
public static final GlobalCompositeOperation SOURCE_IN
public static final GlobalCompositeOperation SOURCE_OUT
public static final GlobalCompositeOperation SOURCE_ATOP
public static final GlobalCompositeOperation DESTINATION_OVER
public static final GlobalCompositeOperation DESTINATION_IN
public static final GlobalCompositeOperation DESTINATION_OUT
public static final GlobalCompositeOperation DESTINATION_ATOP
public static final GlobalCompositeOperation LIGHTER
public static final GlobalCompositeOperation COPY
public static final GlobalCompositeOperation XOR
public static final GlobalCompositeOperation MULTIPLY
public static final GlobalCompositeOperation SCREEN
public static final GlobalCompositeOperation OVERLAY
public static final GlobalCompositeOperation DARKEN
public static final GlobalCompositeOperation LIGHTEN
public static final GlobalCompositeOperation COLOR_DODGE
public static final GlobalCompositeOperation COLOR_BURN
public static final GlobalCompositeOperation HARD_LIGHT
public static final GlobalCompositeOperation SOFT_LIGHT
public static final GlobalCompositeOperation DIFFERENCE
public static final GlobalCompositeOperation EXCLUSION
public static final GlobalCompositeOperation HUE
public static final GlobalCompositeOperation SATURATION
public static final GlobalCompositeOperation COLOR
public static final GlobalCompositeOperation LUMINOSITY
public static GlobalCompositeOperation[] values()
for (GlobalCompositeOperation c : GlobalCompositeOperation.values()) System.out.println(c);
public static GlobalCompositeOperation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null