public enum ImageBlendingMode extends Enum<ImageBlendingMode>
For all feBlend modes, the result opacity is computed as follows:
qr = 1 - (1-qa)*(1-qb)
For the compositing formulas below, the following definitions apply:
cr = Result color (RGB) - premultiplied
qa = Opacity value at a given pixel for image A
qb = Opacity value at a given pixel for image B
ca = Color (RGB) at a given pixel for image A - premultiplied
cb = Color (RGB) at a given pixel for image B - premultiplied
The following table provides the list of available image blending modes:
Image Blending Mode Formula for computing result color
normal | cr = (1 - qa) * cb + ca |
multiply | cr = (1-qa)*cb + (1-qb)*ca + ca*cb |
screen | cr = cb + ca - ca * cb |
darken | cr = Min ((1 - qa) * cb + ca, (1 - qb) * ca + cb) |
lighten | cr = Max ((1 - qa) * cb + ca, (1 - qb) * ca + cb) |
Enum Constant and Description |
---|
darken |
lighten |
multiply |
normal |
screen |
Modifier and Type | Method and Description |
---|---|
static ImageBlendingMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ImageBlendingMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ImageBlendingMode normal
public static final ImageBlendingMode multiply
public static final ImageBlendingMode screen
public static final ImageBlendingMode darken
public static final ImageBlendingMode lighten
public static ImageBlendingMode[] values()
for (ImageBlendingMode c : ImageBlendingMode.values()) System.out.println(c);
public static ImageBlendingMode 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
jataylor@hairyfatguy.com