public enum BlendMode extends Enum<BlendMode>
Enum Constant and Description |
---|
DST_IN
Keeps the destination pixels that cover source pixels, discards the remaining source and destination pixels.
|
DST_OUT
Keeps the destination pixels that are not covered by source pixels.
|
DST_OVER
The source pixels are drawn behind the destination pixels.
|
MULTIPLY
Multiplies the source and destination pixels.
|
PLUS
Adds the source pixels to the destination pixels and saturates the result.
|
SCREEN
Adds the source and destination pixels, then subtracts the source pixels multiplied by the destination.
|
SRC
The source pixels replace the destination pixels.
|
SRC_IN
Keeps the source pixels that cover the destination pixels, discards the remaining source and destination pixels.
|
SRC_OVER
The source pixels are drawn over the destination pixels.
|
Modifier and Type | Method and Description |
---|---|
static BlendMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BlendMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BlendMode DST_IN
\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)
\(C_{out} = C_{dst} * \alpha_{src}\)
public static final BlendMode DST_OUT
\(\alpha_{out} = (1 - \alpha_{src}) * \alpha_{dst}\)
\(C_{out} = (1 - \alpha_{src}) * C_{dst}\)
public static final BlendMode DST_OVER
\(\alpha_{out} = \alpha_{dst} + (1 - \alpha_{dst}) * \alpha_{src}\)
\(C_{out} = C_{dst} + (1 - \alpha_{dst}) * C_{src}\)
public static final BlendMode MULTIPLY
\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)
\(C_{out} = C_{src} * (1 - \alpha_{dst}) + C_{dst} * (1 - \alpha_{src}) + (C_{src} * C_{dst})\)
public static final BlendMode PLUS
\(\alpha_{out} = max(0, min(\alpha_{src} + \alpha_{dst}, 1))\)
\(C_{out} = max(0, min(C_{src} + C_{dst}, 1))\)
public static final BlendMode SCREEN
\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)
\(C_{out} = C_{src} + C_{dst} - C_{src} * C_{dst}\)
public static final BlendMode SRC
\(\alpha_{out} = \alpha_{src}\)
\(C_{out} = C_{src}\)
public static final BlendMode SRC_IN
\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)
\(C_{out} = C_{src} * \alpha_{dst}\)
public static final BlendMode SRC_OVER
\(\alpha_{out} = \alpha_{src} + (1 - \alpha_{src}) * \alpha_{dst}\)
\(C_{out} = C_{src} + (1 - \alpha_{src}) * C_{dst}\)
public static BlendMode 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 nullpublic static BlendMode[] values()
for (BlendMode c : BlendMode.values()) System.out.println(c);