Enum BlendMode
- java.lang.Object
-
- java.lang.Enum<BlendMode>
-
- com.github.weisj.jsvg.attributes.filter.BlendMode
-
- All Implemented Interfaces:
HasMatchName
,java.io.Serializable
,java.lang.Comparable<BlendMode>
public enum BlendMode extends java.lang.Enum<BlendMode> implements HasMatchName
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Color
The final color has the hue and saturation of the top color, while using the luminosity of the bottom color.ColorBurn
The final color is the result of inverting the bottom color, dividing the value by the top color, and inverting that value.ColorDodge
The final color is the result of dividing the bottom color by the inverse of the top color.Darken
The final color is composed of the darkest values of each color channel.Difference
The final color is the result of subtracting the darker of the two colors from the lighter one.Exclusion
The final color is similar to difference, but with less contrast.HardLight
The final color is the result of multiply if the top color is darker, or screen if the top color is lighter.Hue
The final color has the hue of the top color, while using the saturation and luminosity of the bottom color.Lighten
The final color is composed of the lightest values of each color channel.Luminosity
The final color has the luminosity of the top color, while using the hue and saturation of the bottom color.Multiply
The final color is the result of multiplying the top and bottom colors.Normal
The final color is the top color, regardless of what the bottom color is.Overlay
The final color is the result of multiply if the bottom color is darker, or screen if the bottom color is lighter.Saturation
The final color has the saturation of the top color, while using the hue and luminosity of the bottom color.Screen
The final color is the result of inverting the colors, multiplying them, and inverting that value.SoftLight
The final color is similar to hard-light, but softer.
-
Field Summary
Fields Modifier and Type Field Description private @NotNull java.lang.String
matchName
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.String
matchName()
static BlendMode
valueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
Normal
public static final BlendMode Normal
The final color is the top color, regardless of what the bottom color is. The effect is like two opaque pieces of paper overlapping.
-
Multiply
public static final BlendMode Multiply
The final color is the result of multiplying the top and bottom colors. A black layer leads to a black final layer, and a white layer leads to no change. The effect is like two images printed on transparent film overlapping.
-
Screen
public static final BlendMode Screen
The final color is the result of inverting the colors, multiplying them, and inverting that value. A black layer leads to no change, and a white layer leads to a white final layer. The effect is like two images shone onto a projection screen.
-
Overlay
public static final BlendMode Overlay
The final color is the result of multiply if the bottom color is darker, or screen if the bottom color is lighter. This blend mode is equivalent to hard-light but with the layers swapped.
-
Darken
public static final BlendMode Darken
The final color is composed of the darkest values of each color channel.
-
Lighten
public static final BlendMode Lighten
The final color is composed of the lightest values of each color channel.
-
ColorDodge
public static final BlendMode ColorDodge
The final color is the result of dividing the bottom color by the inverse of the top color. A black foreground leads to no change. A foreground with the inverse color of the backdrop leads to a fully lit color. This blend mode is similar to screen, but the foreground need only be as light as the inverse of the backdrop to create a fully lit color.
-
ColorBurn
public static final BlendMode ColorBurn
The final color is the result of inverting the bottom color, dividing the value by the top color, and inverting that value. A white foreground leads to no change. A foreground with the inverse color of the backdrop leads to a black final image. This blend mode is similar to multiply, but the foreground need only be as dark as the inverse of the backdrop to make the final image black.
-
HardLight
public static final BlendMode HardLight
The final color is the result of multiply if the top color is darker, or screen if the top color is lighter. This blend mode is equivalent to overlay but with the layers swapped. The effect is similar to shining a harsh spotlight on the backdrop.
-
SoftLight
public static final BlendMode SoftLight
The final color is similar to hard-light, but softer. This blend mode behaves similar to hard-light. The effect is similar to shining a diffused spotlight on the backdrop.
-
Difference
public static final BlendMode Difference
The final color is the result of subtracting the darker of the two colors from the lighter one. A black layer has no effect, while a white layer inverts the other layer's color.
-
Exclusion
public static final BlendMode Exclusion
The final color is similar to difference, but with less contrast. As with difference, a black layer has no effect, while a white layer inverts the other layer's color.
-
Hue
public static final BlendMode Hue
The final color has the hue of the top color, while using the saturation and luminosity of the bottom color.
-
Saturation
public static final BlendMode Saturation
The final color has the saturation of the top color, while using the hue and luminosity of the bottom color. A pure gray backdrop, having no saturation, will have no effect.
-
Color
public static final BlendMode Color
The final color has the hue and saturation of the top color, while using the luminosity of the bottom color. The effect preserves gray levels and can be used to colorize the foreground.
-
Luminosity
public static final BlendMode Luminosity
The final color has the luminosity of the top color, while using the hue and saturation of the bottom color. This blend mode is equivalent to color, but with the layers swapped.
-
-
Method Detail
-
values
public static BlendMode[] 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 (BlendMode c : BlendMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BlendMode 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
-
matchName
@NotNull public @NotNull java.lang.String matchName()
- Specified by:
matchName
in interfaceHasMatchName
-
-